SourceBuffer: updatestart event
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
Note: This feature is available in Dedicated Web Workers.
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():
js
addEventListener("updatestart", (event) => { })
Alternatively, assign to the event handler property of the interface:
js
onupdatestart = (event) => { }
Event type
A generic Event.
Examples
>Listening for the updatestart event
js
const sourceBuffer = source.addSourceBuffer(mimeCodec);
sourceBuffer.addEventListener("updatestart", () => {
downloadStatus.textContent = "Modifying buffer...";
});
sourceBuffer.addEventListener("updateend", () => {
downloadStatus.textContent = "Modification complete";
});
Specifications
| Specification |
|---|
| Media Source Extensions™> # dfn-updatestart> |
| Media Source Extensions™> # dom-sourcebuffer-onupdatestart> |