Whether the sink can currently accept an append (open and not mid-error / closed).
Appends one decoded-container byte slice to the underlying buffer. Rejects if the sink isn't open or the underlying buffer rejects the append (the player then drops the chunk and continues).
The raw container bytes (e.g. a webm-opus slice) to append.
Tears the sink down: stops playback and releases the media source / audio element. Idempotent.
Prepares the sink for playback: creates the media source / source buffer / audio element and resolves once it is ready to accept AppendChunk. Idempotent — a second call while ready is a no-op.
Mutes or unmutes playback (the speaker toggle).
The real, DOM-backed IAudioSink: a
MediaSourcewhose singleaudio/webm;codecs=opusSourceBufferis fed appended chunks, attached to a hidden<audio>element that auto-plays. Autoplay is permitted because the realtime call the user already started is the activating gesture.Kept out of the player's hot path so the queueing logic stays unit-testable; this class is exercised in the live app (it can't be meaningfully unit-tested without a browser media stack).