fix(subtitle): a cue's endTime qeual next cues's startTime,track.activeCues prob

This commit is contained in:
yuusora 2022-05-13 12:21:31 +08:00
parent a25d7d4da9
commit fa4835d750
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class Subtitle {
const track = this.video.textTracks[0];
track.oncuechange = () => {
const cue = track.activeCues[0];
const cue = track.activeCues[track.activeCues.length - 1];
this.container.innerHTML = '';
if (cue) {
const template = document.createElement('div');