Draft
This page is not complete.
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The TrackDefault()
constructor of the TrackDefault
interface constructs and returns a new TrackDefault
object.
Syntax
var trackDefault = new TrackDefault(type, language, label, kinds, byteStreamTrackID);
Parameters
- type
- A
DOMString
specifying a media segment data type for theSourceBuffer
to contain. Can beaudio
,video
, ortext
. - language
- A
DOMString
specifying a default language for theSourceBuffer
to use when an initialization segment does not contain language information for a new track. - label
- A
DOMString
specifying a default label for theSourceBuffer
to use when an initialization segment does not contain label information for a new track. - kinds
- An array (sequence) of
DOMString
s specifying default kinds for theSourceBuffer
to use when an initialization segment does not contain kind information for a new track. - byteStreamTrackID Optional
- A
DOMString
specifying the ID of the specific track that theSourceBuffer
should apply to. If not specified, this value will be an empty string and theSourceBuffer
can contain any tracks of the specifiedtype
.
Errors
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 . |
Example
TBD
Specifications
Specification | Status | Comment |
---|---|---|
Media Source Extensions The definition of 'TrackDefault' in that specification. |
Candidate Recommendation | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | ? | No support | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? |
No support |
No support | ? | ? | No support |
See also
Document Tags and Contributors
Tags:
Contributors to this page:
chrisdavidmills
Last updated by:
chrisdavidmills,