草案
此页面不完整。
过时
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.
TrackDefault()
constructor of the
TrackDefault
interface constructs and returns a new
TrackDefault
对象。
var trackDefault = new TrackDefault(type, language, label, kinds, byteStreamTrackID);
DOMString
specifying a media segment data type for the
SourceBuffer
to contain. Can be
audio
,
视频
,或
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 | 解释 |
|---|---|
InvalidAccessError
|
The supplied
语言
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
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
TrackDefault()
构造函数
非标
|
Chrome ? | Edge ≤18 | Firefox 不支持 No | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android 不支持 No | Opera Android ? | Safari iOS 不支持 No | Samsung Internet Android ? |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。
TrackDefault
TrackDefault()