package js.html
extends EventTarget
Available on js
The SourceBuffer interface represents a chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object. This can be made up of one or several media segments.
Documentation SourceBuffer by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
appendWindowEnd:FloatControls the timestamp for the end of the append window.
appendWindowStart:FloatControls the timestamp for the start of the append window. This is a timestamp range that can be used to filter what media data is appended to the SourceBuffer. Coded media frames with timestamps within this range will be appended, whereas those outside the range will be filtered out.
read onlybuffered:TimeRangesReturns the time ranges that are currently buffered in the SourceBuffer.
mode:SourceBufferAppendModeControls how the order of media segments in the SourceBuffer is handled, in terms of whether they can be appended in any order, or they have to be kept in a strict sequence.
onabort:FunctionFired whenever SourceBuffer.appendBuffer() or SourceBuffer.appendStream() is ended by a call to SourceBuffer.abort(). SourceBuffer.updating changes from true to false.
onerror:FunctionFired whenever an error occurs during SourceBuffer.appendBuffer() or SourceBuffer.appendStream(). SourceBuffer.updating changes from true to false.
onupdate:FunctionFired whenever SourceBuffer.appendBuffer() method or the SourceBuffer.remove() completes. SourceBuffer.updating changes from true to false. This event is fired before onupdateend.
onupdateend:FunctionFired whenever SourceBuffer.appendBuffer() method or the SourceBuffer.remove() has ended. This event is fired after onupdate.
onupdatestart:FunctionFired whenever the value of SourceBuffer.updating transitions from false to true.
timestampOffset:FloatControls the offset applied to timestamps inside media segments that are subsequently appended to the SourceBuffer.
read onlyupdating:BoolA boolean indicating whether the SourceBuffer is currently being updated — i.e. whether an SourceBuffer.appendBuffer(), SourceBuffer.appendStream(), or SourceBuffer.remove() operation is currently in progress.
abort():VoidAborts the current segment and resets the segment parser.
Throws:
null |
DOMError |
|---|
appendBuffer(data:ArrayBufferView):VoidappendBuffer(data:ArrayBuffer):VoidAppends media segment data from an ArrayBuffer or ArrayBufferView object to the SourceBuffer.
Throws:
null |
DOMError |
|---|
changeType(type:String):VoidChanges the MIME type that future calls to SourceBuffer.appendBuffer will expect the new data to conform to.
Throws:
null |
DOMError |
|---|
remove(start:Float, end:Float):VoidRemoves media segments within a specific time range from the SourceBuffer.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/SourceBuffer.html