mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-07-19 20:49:44 +08:00
视频播放每10s差值上传观看记录
This commit is contained in:
parent
3786355eb0
commit
49061afdc8
@ -66,7 +66,7 @@ export const VideoModel: React.FC<PropInterface> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const playTimeUpdate = (duration: number, isEnd: boolean) => {
|
const playTimeUpdate = (duration: number, isEnd: boolean) => {
|
||||||
if (duration >= 10 || isEnd === true) {
|
if (duration - playDuration >= 10 || isEnd === true) {
|
||||||
setPlayDuration(duration);
|
setPlayDuration(duration);
|
||||||
course.record(cid, id, duration).then((res: any) => {});
|
course.record(cid, id, duration).then((res: any) => {});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user