SourceBuffer.trackDefaults

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Draft
This page is not complete.

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

Specifications

Specification Status Comment
Media Source Extensions
The definition of 'trackDefaults' in that specification.
Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
trackDefaultsChrome ? Edge ? Firefox No support NoIE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android No support NoOpera Android ? Safari iOS No support NoSamsung Internet Android ?

Legend

No support  
No support
Compatibility unknown  
Compatibility unknown

See also