Subtitle Problem: when current cue's endTime=== next cue's startTime, seek to next cue's startTime will cause showing current cue until next cue's endtime
Example: In MDN, webvtt format allows a cue's endTime equal the next cue's startTime(00:00:20.000 -> 00:00.25.000 text1)(00:00:25.000 -> 00:00:30.000 text2). When you seek a time just accurate 25.000sec, player will show text1 untill 00:00:30. 在MDN规范中,webvtt格式允许cue的endTime等于下一个cue的startTime。当使用seek去一个时间精确的等于25秒时,播放器会一直展示text1直到30秒。 A cue's endTime is 00:00:25.000, and next cue's startTime is 00:00:25.000. When seek to 25.000sec, will show first cue's text until next cue's endTime. 比如一个cue的endTime是00:00:25.000,下一个cue的startTime是00:00:25.000。当seek到25.000秒时,会一直显示第一个cue的文字直到第二个cue结束(endTime)。
Reason:
This is the Chrome's behavior, in html5 native player, subtitle track's activecues(array list), will clear current cue when player'stime achive cue's endtime. But when seek to next cue's startTime that equal, activecues will keep 2 cues( like image)
这是一个Chrome的行为,在h5原生播放器中,字幕track的activecues列表,在达到当前字幕的结束时间将会移除当前字幕。但是如果seek到一个时间,又和两个字幕分别的开始和结束时间相等,acitcecues列表将会保持两个字幕。
And, dplayer's custom subtitle container will always use activecues[0]'s text to displaye the cue text.
并且,dplayer的自定义字幕容器会一直使用acitvecues[0]的文字去显示cue的文字。
Resolve:
I can't change the browser's behavior , but use activecues[activecues.length - 1] would be better?
我不能改变浏览器的行为,但是使用activecues[activecues.length - 1]会更好吗?

I made a vtt sample which some cues accoding to the issue. and a seek sample print the activeCues

.
Fixed in, https://github.com/DIYgod/DPlayer/pull/1241/commits/fa4835d75006374677c7d8185c76606f7054c512 Have been merged