Skip to content

Commit

Permalink
修复:视频从0到1的时候会阻塞,只有到2才能播放的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikaros-521 committed Sep 10, 2024
1 parent fbbb3c7 commit dfeb5b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@
// 非默认视频情况下,删除掉已播放完的这个视频(此处在用户异常操作队列的情况下会有bug)
if (videoQueue.length == 1 && !CurVideoisSameWithDefault()) {
videoQueue.shift();
}
}
// 如果当前视频是默认视频,那说明是第一次插入,则需要进行播放
else if (videoQueue.length == 1 && CurVideoisSameWithDefault()) {
prepareNextVideo(videoQueue[0]);
}

if (!isWaitingForNextVideo) {
console.log('播放默认视频');
Expand Down

0 comments on commit dfeb5b3

Please sign in to comment.