Repository navigation
fix(media): don't show the mini player for silent or muted media - #256
Open
barto95100 wants to merge 2 commits into
Open
barto95100 wants to merge 2 commits into
barto95100 wants to merge 2 commits into
Conversation
Muted autoplay videos (page backgrounds, previews, ads) were marked as played and brought up the mini player, and one code path computed its visibility from all sessions instead of played ones. Only audible media count as played, including a muted video the user unmutes. Ported from the upstream branch tembo/fix-mini-player-trigger-no-media, which no longer applies after upstream's file reorganisation. Fixes the-ora#187.
[Medium impact] The change affects the browser's media-player workflow. The silent-video case should be fixed before merging. Findings
SummaryThe PR limits mini-player eligibility to media played while unmuted and above zero volume.
Reviews (1) · Last reviewed commit: "fix(media): don't show the mini player f..." · Reviewed by Greptile |
…nd PiP An unmuted video with no audio track (page backgrounds) still counted as audible. Media now count as audible only when not muted, with volume up, and with a sound track: audioTracks for files once their metadata is loaded (checked again on playing); streams (blob: URLs, media streams), which may list no tracks, are assumed to have sound. Automatic Picture in Picture uses the same rule, so a silent or muted video no longer goes to PiP.
This branch has not been deployed
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.
Summary
Closes #187.
Muted autoplay videos (page backgrounds, previews, ads) were marked as played and brought up the mini player, and one code path computed its visibility from all media sessions instead of the played ones. Only audible media now count as played, including a muted video the user unmutes.
Ported from the branch
tembo/fix-mini-player-trigger-no-media, which no longer applies after the file reorganisation.Automatic Picture in Picture uses the same rule, so silent or muted videos no longer go to PiP either.
Type of Change
Testing
AI Assistance Disclosure
Code written with Claude (AI) under my direction; I reviewed and tested every change on macOS.
Checklist