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