v138 · multimedia

Deprecate asynchronous range removal for Media Source Extensions

The Media Source standard long ago changed to disallow ambiguously defined behavior involving asynchronous range removals: * SourceBuffer.abort() no longer aborts SourceBuffer.remove() operations * Setting MediaSource.duration can no longer truncate currently buffered media

concepts

  1. MSE Range Removal

    Media Source Extensions deprecates the async semantics for SourceBuffer.remove(). Aligns with the spec; sites depending on async update events need a migration.

  2. Migration codemod

    Paste real DASH/HLS player code; the codemod rewrites updateend-chained removes into awaited sequential calls so a deprecation warning becomes a clean upgrade.

  3. Sequence trace

    Timing diagrams side-by-side: pre-v138 (silent queue with a race window) vs v138 (synchronous throw, retry on updateend). Shows exactly where the race opened up.

  4. Sync Removal Demo

    Visual timeline of a simulated MSE buffer. Click segments to select a range, then try the synchronous (correct) and async (deprecated) remove paths side by side — the async path shows the Chrome 138 InvalidStateError.

why it shipped

Chromium should comply with the spec and shipping behavior in Firefox and Safari to avoid future interop issues while usage remains low.

references