new SourceUpdater(mediaSource, mimeType)
A queue of callbacks to be serialized and applied when a
MediaSource and its associated SourceBuffers are not in the
updating state. It is used by the segment loader to update the
underlying SourceBuffers when new data is loaded, for instance.
Parameters:
Name | Type | Description |
---|---|---|
mediaSource |
MediaSource | the MediaSource to create the SourceBuffer from |
mimeType |
String | the desired MIME type of the underlying SourceBuffer |
- Source:
Methods
abort(done)
Aborts the current segment and resets the segment parser.
Parameters:
Name | Type | Description |
---|---|---|
done |
function | function to call when done |
- Source:
- See:
appendBuffer(bytes, done)
Queue an update to append an ArrayBuffer.
Parameters:
Name | Type | Description |
---|---|---|
bytes |
ArrayBuffer | |
done |
function | the function to call when done |
- Source:
- See:
buffered()
Indicates what TimeRanges are buffered in the managed SourceBuffer.
- Source:
- See:
dispose()
dispose of the source updater and the underlying sourceBuffer
- Source:
duration(duration)
Queue an update to set the duration.
Parameters:
Name | Type | Description |
---|---|---|
duration |
Double | what to set the duration to |
- Source:
- See:
queueCallback_()
que a callback to run
- Source:
remove(start, end)
Queue an update to remove a time range from the buffer.
Parameters:
Name | Type | Description |
---|---|---|
start |
Number | where to start the removal |
end |
Number | where to end the removal |
- Source:
- See:
runCallback_()
run a queued callback
- Source:
timestampOffset() → {Number}
Set/get the timestampoffset on the SourceBuffer
- Source:
Returns:
the timestamp offset
- Type
- Number
updating() → {Boolean}
wether the underlying sourceBuffer is updating or not
- Source:
Returns:
the updating status of the SourceBuffer
- Type
- Boolean