SourceBuffer: updatestart event
Media Source Extensionswindowanddedicated
Media Source Extensionswindow_and_dedicated
The updatestart event of the SourceBuffer interface signals the beginning of an appendBuffer() or remove() operation. The updating attribute transitions from false to true.
Syntax
Use the event name in addEventListener():
addEventListener("updatestart", (event) => { })
Alternatively, assign to the event handler property of the interface:
onupdatestart = (event) => { }
Event type
A generic Event.
Examples
Listening for the updatestart event
const sourceBuffer = source.addSourceBuffer(mimeCodec);
sourceBuffer.addEventListener("updatestart", () => {
downloadStatus.textContent = "Modifying buffer...";
});
sourceBuffer.addEventListener("updateend", () => {
downloadStatus.textContent = "Modification complete";
});
Specifications
Browser compatibility
See also
- SourceBuffer.appendBuffer()
- SourceBuffer.remove()