This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27939 - Omissions from the VTTCue interface in the API
Summary: Omissions from the VTTCue interface in the API
Status: RESOLVED WORKSFORME
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
URL: http://dev.w3.org/html5/webvtt/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-31 20:25 UTC by James Brink
Modified: 2015-02-01 02:41 UTC (History)
3 users (show)

See Also:


Attachments

Description James Brink 2015-01-31 20:25:35 UTC
It seems to me that attributes for "id", "startTime", and "endTime" should be added to the VTTCue interface in section 7.1 of the January 2015 draft.  The last two are parameters in the constructor. The identifier "id" is described elsewhere in the document and the attribute "id" is already allowed by several browsers.  "id" could also be added as an optional parameter in the constructor.

As a convenience to programmers using the VTTCue interface in applications, it would be useful to have way (possibly a function) for adding a WebVTT cue settings list to the cue as a single string using the same format that one would use in the WebVTT file on the start and end times lines.  This string could also possibly be added as an optional parameter for the constructor.
Comment 1 Brendan Long 2015-01-31 21:14:40 UTC
VTTCue extends TextTrackCue:

> interface VTTCue : TextTrackCue

Which is defined here:

https://html.spec.whatwg.org/#texttrackcue

interface TextTrackCue : EventTarget {
  readonly attribute TextTrack? track;

  attribute DOMString id;
  attribute double startTime;
  attribute double endTime;
  attribute boolean pauseOnExit;

  attribute EventHandler onenter;
  attribute EventHandler onexit;
};

So id, startTime and endTime are already part of it.
Comment 2 Silvia Pfeiffer 2015-02-01 02:41:29 UTC
As Brendan explained in comment#1, VTTCue extends TextTrackCue, so all the attributes that you're missing are actually there.