Add aspect ratio selector to video player#50
Open
4in4in wants to merge 1 commit into
Open
Conversation
28296c0 to
0533094
Compare
Adds a button next to the resize mode toggle that lets the user force the video aspect ratio: Auto (video's own), 1:1, 4:3, 16:9, 18:9, 21:9, or a custom value entered as '16:9', '16/9' or '1.78'. Useful for videos that were uploaded with wrong proportions (e.g. 4:3 content stretched to 16:9). The choice is per-video: it resets to Auto when playback moves to a different stream, but survives quality changes of the same stream. Hidden in the popup player, like the resize mode button.
0533094 to
3d9ff44
Compare
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.
What
Adds an aspect ratio selector to the main video player, next to the existing resize mode (FIT/FILL/ZOOM) button.
16:9,16/9or decimal1.78inputWhy
Some videos are uploaded with wrong proportions (typically old 4:3 content stretched to 16:9, or anamorphic video without proper metadata). The resize modes can't fix that — they change how the video fits the screen, not the picture's own proportions. Forcing the correct ratio is the only way to watch such videos undistorted. VLC and MX Player offer the same control.
Behavior details
onMetadataChanged, which only fires when the stream URL actually changes).