Skip to content

Commit

Permalink
fix(script): 优化超星视频重复播放时没有重置视频进度的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Mar 5, 2024
1 parent 6953011 commit c167ff0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/scripts/src/projects/cx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,10 @@ async function mediaTask(

$console.log('视频开始播放');
media.volume = volume;

// 重置视频进度
media.currentTime = 0;

playMedia(() => media.play())
.then(() => {
media.playbackRate = playbackRate;
Expand Down

0 comments on commit c167ff0

Please sign in to comment.