播放页面优化

This commit is contained in:
禺狨 2023-07-03 17:18:11 +08:00
parent 3780b8afc8
commit 8e96e2e844

View File

@ -36,6 +36,7 @@ const CoursePlayPage = () => {
const totalRef = useRef(0);
useEffect(() => {
window.player && window.player.destroy();
getCourse();
getDetail();
}, [params.courseId, params.hourId]);
@ -179,11 +180,11 @@ const CoursePlayPage = () => {
window.player.seek(playRef.current);
return;
}
setPlayingTime(0);
playTimeUpdate(parseInt(window.player.video.currentTime), true);
exitFullscreen();
window.player && window.player.destroy();
setPlayingTime(0);
setPlayendedStatus(true);
playTimeUpdate(parseInt(window.player.video.currentTime), true);
});
setLoading(false);
};