package js.html
extends EventTarget
Available on js
The MediaSource interface of the Media Source Extensions API represents a source of media data for an HTMLMediaElement object. A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent.
Documentation MediaSource by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
staticisTypeSupported(type:String):Boolnew()Throws:
null |
DOMError |
|---|
read onlyactiveSourceBuffers:SourceBufferListReturns a SourceBufferList object containing a subset of the SourceBuffer objects contained within MediaSource.sourceBuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
duration:FloatGets and sets the duration of the current media being presented.
onsourceclosed:Functiononsourceended:FunctionThe event handler for the sourceended event.
onsourceopen:FunctionThe event handler for the sourceopen event.
read onlyreadyState:MediaSourceReadyStateReturns an enum representing the state of the current MediaSource, whether it is not currently attached to a media element (closed), attached and ready to receive SourceBuffer objects (open), or attached but the stream has been ended via MediaSource.endOfStream() (ended.)
read onlysourceBuffers:SourceBufferListReturns a SourceBufferList object containing the list of SourceBuffer objects associated with this MediaSource.
addSourceBuffer(type:String):SourceBufferCreates a new SourceBuffer of the given MIME type and adds it to the MediaSource.sourceBuffers list.
Throws:
null |
DOMError |
|---|
clearLiveSeekableRange():VoidClears a seekable range privious set with a call to setLiveSeekableRange().
Throws:
null |
DOMError |
|---|
endOfStream(?error:MediaSourceEndOfStreamError):VoidSignals the end of the stream.
Throws:
null |
DOMError |
|---|
removeSourceBuffer(sourceBuffer:SourceBuffer):VoidRemoves the given SourceBuffer from the MediaSource.sourceBuffers list.
Throws:
null |
DOMError |
|---|
setLiveSeekableRange(start:Float, end:Float):VoidSets the range that the user can seek to in the media element.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/MediaSource.html