Only fall back to muted playback on NotAllowedError - #951
Open
daveyijzermans wants to merge 1 commit into
Open
Conversation
The play() fallback treated every rejection as an autoplay-policy block and permanently muted the video. Transient rejections (e.g. AbortError when a new load interrupts play during stream reconnect or conditional card re-show) also tripped it, leaving kiosks silent until a full page reload. Only fall back to muted playback on NotAllowedError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
play()treats everyvideo.play()rejection as an autoplay-policy block and permanently setsvideo.muted = true.Only
NotAllowedErrormeans "autoplay blocked". Transient rejections — e.g.AbortErrorwhen a stream reconnects or a conditional card re-shows mid-play — also trigger the fallback today, silently muting the video forever. This especially bites kiosk setups running Chromium with--autoplay-policy=no-user-gesture-required(whereNotAllowedErrorcan never occur) with.controlshidden via CSS, so nothing can ever unmute. A fresh page load plays unmuted, showing policy is not the blocker — the mute is accumulated runtime damage.This gates the mute-fallback on
er.name === 'NotAllowedError'; other rejections are only logged.NotAllowedError(autoplay blocked)AbortError/ other transientRunning for several weeks on a kiosk that previously went silent every few days: no regressions, no more silent muting.
🤖 Generated with Claude Code