Obsolete
This 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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
trackDefaults | 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.