Web/API/SourceBuffer/trackDefaults

From Get docs

ObsoleteThis feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.


The trackDefaults property of the SourceBuffer interface specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the SourceBuffer.

Syntax

var myTrackDefaults = sourceBuffer.trackDefaults;

sourceBuffer.trackDefaults = myTrackDefaultList;

Value

A TrackDefaultList object.

Exceptions

The following exceptions may be thrown when setting a new value for this property.

Exception Explanation
InvalidStateError One or more of the SourceBuffer objects in MediaSource.sourceBuffers are being updated (i.e. their SourceBuffer.updating property is currently true), or this SourceBuffer has been removed from the MediaSource.

Example

TBD

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet

trackDefaults

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

No support No

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

No support No

Opera Android

?

Safari iOS

No support No

Samsung Internet Android

?

Legend

No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.'
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.'
Deprecated. Not for use in new websites.


See also