Skip to content

media-element-playout 12.2.0 — player-mode ergonomics

Choose a tag to compare

@naomiaro naomiaro released this 30 Jun 04:19
7d40d72

@waveform-playlist/media-element-playout@12.2.0 — player-mode ergonomics

Three additive, non-breaking affordances for single-track players (podcast/audiobook readers, <daw-player>):

  • resume() — play from the current position (plain play() with no offset resets to 0)
  • setSource() / load() — in-place .src swap that reuses the element (preserving the once-per-element Web Audio source node / effects routing); silent, while addTrack() keeps its "Only one track is supported" warning as the misuse signal
  • Typed on()/off() event emitter (MediaElementTrackEvents: loadedmetadata/play/pause/error/ended/timeupdate), forwarded by the playout across source swaps; legacy setOnXCallback setters retained

Notable: load() re-applies the configured playbackRate after the swap — the HTML media-element load algorithm resets it to 1.0.

Issue #531 · PR #533