Steps to reproduce
TextTrack.addCue method only accepts cues that are in time order. If you try to append a new cue that appears before an existing cue, it will throw an
Invalid argument error. Although the spec doesn’t explicitly state whether this should be accepted, all other browsers accept cues in any order.
var video = document.createElement('video'); var text = video.addTextTrack('captions', 'id'); text.addCue(new TextTrackCue(5, 10, 'cue2')); text.addCue(new TextTrackCue(0, 5, 'cue1'));
Comments and activity
- Microsoft Edge Team
Changed Assigned To to “Steven K.”
Changed Status to “Duplicate”
Thank you for submitting this issue. I reproduced the issue you are seeing. We have a previous submission for the same issue so I will duplicate this issue to that one. I used your simplified repro to begin the testing, so that is appreciated.
Also, can you tell me if you are using the same TextTrackCue() constructor when running in Chrome?
This bug has marked as duplicate. Please follow the parent issue to get new updates.
Here is the Issue I duplicated your submission to:
TextTrackCueas an abstract class, so you can’t call the constructor. But you can just use
VTTCueinstead, which accepts the same arguments in the same order.
Ok, good to know. Thank you for the help and quick response. :)