SourceBuffer: updatestart event - Web APIs | MDN

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

js

addEventListener("updatestart", (event) => { })

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

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.