mirror of
https://github.com/PlayEdu/h5.git
synced 2025-06-08 19:14:10 +08:00
播放页面优化
This commit is contained in:
parent
3780b8afc8
commit
8e96e2e844
@ -36,6 +36,7 @@ const CoursePlayPage = () => {
|
|||||||
const totalRef = useRef(0);
|
const totalRef = useRef(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
window.player && window.player.destroy();
|
||||||
getCourse();
|
getCourse();
|
||||||
getDetail();
|
getDetail();
|
||||||
}, [params.courseId, params.hourId]);
|
}, [params.courseId, params.hourId]);
|
||||||
@ -179,11 +180,11 @@ const CoursePlayPage = () => {
|
|||||||
window.player.seek(playRef.current);
|
window.player.seek(playRef.current);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
setPlayingTime(0);
|
||||||
|
playTimeUpdate(parseInt(window.player.video.currentTime), true);
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
window.player && window.player.destroy();
|
window.player && window.player.destroy();
|
||||||
setPlayingTime(0);
|
|
||||||
setPlayendedStatus(true);
|
setPlayendedStatus(true);
|
||||||
playTimeUpdate(parseInt(window.player.video.currentTime), true);
|
|
||||||
});
|
});
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user