Draft
This page is not complete.
This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The TrackDefault()
constructor of the TrackDefault
interface constructs and returns a new TrackDefault
object.
var trackDefault = new TrackDefault(type, language, label, kinds, byteStreamTrackID);
DOMString
specifying a media segment data type for the SourceBuffer
to contain. Can be audio
, video
, or text
.DOMString
specifying a default language for the SourceBuffer
to use when an initialization segment does not contain language information for a new track.DOMString
specifying a default label for the SourceBuffer
to use when an initialization segment does not contain label information for a new track.DOMString
s specifying default kinds for the SourceBuffer
to use when an initialization segment does not contain kind information for a new track.DOMString
specifying the ID of the specific track that the SourceBuffer
should apply to. If not specified, this value will be an empty string and the SourceBuffer
can contain any tracks of the specified type
.when this constructor is invoked, the following errors can occur:
Error | Explanation |
---|---|
InvalidAccessError | The supplied language is not a valid language code, e.g. en-US . |
TypeError | there are values specified in the kinds array that do not apply to the specified type . |
TBD
Specification | Status | Comment |
---|---|---|
Media Source Extensions The definition of 'TrackDefault' in that specification. | Candidate Recommendation | Initial definition. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | ? | Not supported | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | Not supported | Not supported | ? | ? | Not supported |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TrackDefault/TrackDefault