TextTrack.addCue rejects out of order cues

Duplicate Issue #13183203 • See Issue #11979877

Details

Author
Jacob T.
Created
Aug 10, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Duplicates
See progress on Bug #11979877
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

The 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.

Repro:

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'));

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

      Changed Status to “Duplicate”

    • Hi Jacob,

      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?

      Steve

    • This bug has marked as duplicate. Please follow the parent issue to get new updates.

    • Here is the Issue I duplicated your submission to:

      https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11979877/

    • Chrome has TextTrackCue as an abstract class, so you can’t call the constructor. But you can just use VTTCue instead, which accepts the same arguments in the same order.

    • Ok, good to know.  Thank you for the help and quick response.  :)

    You need to sign in to your Microsoft account to add a comment.

    Sign in