mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-08 08:54:11 +08:00
视频播放页面屏蔽右键菜单
This commit is contained in:
parent
29630ec1ee
commit
537cac224a
@ -32,6 +32,13 @@ const CoursePalyPage = () => {
|
|||||||
e = e || window.event;
|
e = e || window.event;
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
return () => {
|
||||||
|
document.oncontextmenu = function (e) {
|
||||||
|
/*恢复浏览器默认右键事件*/
|
||||||
|
e = e || window.event;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}, [params.courseId, params.hourId]);
|
}, [params.courseId, params.hourId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -170,6 +177,11 @@ const CoursePalyPage = () => {
|
|||||||
className={styles["close-btn"]}
|
className={styles["close-btn"]}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.player && window.player.destroy();
|
window.player && window.player.destroy();
|
||||||
|
document.oncontextmenu = function (e) {
|
||||||
|
/*恢复浏览器默认右键事件*/
|
||||||
|
e = e || window.event;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
navigate(-1);
|
navigate(-1);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user