Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to remove black bars in full screen mode #2141

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

bart1998
Copy link
Contributor

@bart1998 bart1998 commented Apr 1, 2024

Added an option to fill the screen while maintaining aspect ratio in full screen mode. This solves issue #1069

@ImprovedTube
Copy link
Member

hi! @bart1998 thank you!
this is a rare feature or only for 21:9 screens? then it should appear in the end of our player section rather than the start.

alternatively it can also appear conditionally only on 21:9 screens (we have variable for screen size)

should it be enabled by default on 21:9 screens?

hi! @TuTAH1

@bart1998
Copy link
Contributor Author

bart1998 commented Apr 1, 2024

image

This is another use case, although it might not happen too often. Therefore i think it is best not to limit this to devices with certain aspect ratio's.
I have moved the setting to the bottom of the page.

@ImprovedTube ImprovedTube merged commit 5acbe47 into code-charity:master Apr 1, 2024
@ImprovedTube
Copy link
Member

thanks! @bart1998 ready to send this to everybody! (and i agree it is related to player size too, could appear below player size, for 21:9 screens at least)


image

how common is (b)?

Will object-fit:contain help too sometimes? ( That could be part of our player-size:fit to window always and would be universal (including vertical screens even) (the player-size:fit to window option needs to be fixed/updated though)
( Equally (for the cases where it might helps without cropping the video), object-fit:contain could also be part of our simpler options for player size: max height or max. width. ( Or for full height one could stop excluding full-screen from the options here? and make sure video stays is centered)

/*outdated line?*/ html[data-page-type=video][it-player-size='full_window'] ytd-watch-flexy[theater]:not([fullscreen]) #player-wide-container,
html[data-page-type=video][it-player-size='full_window'] ytd-watch-flexy[full-bleed-player]:not([fullscreen]) #full-bleed-container.ytd-watch-flexy {
height: calc(var(--it-player-size, 100vh) - var(--it-header-size, 0)) !important;
max-height: var(--it-player-size, 100vh) !important;
)
)


did @TuTAH1 #1067 also mean video pages? (not full screen)

@TuTAH1
Copy link

TuTAH1 commented Apr 1, 2024

did @TuTAH1 #1067 also mean video pages? (not full screen)

yes, in #1069 I also meant unmaximazed and wide mode. (b) is common either on 21:9 screen with 21:9 content, but 16:9 video, either the same, but in 16:9 screen in wide mode

@bart1998
Copy link
Contributor Author

bart1998 commented Apr 2, 2024

In the not full screen mode there are no black bars added by youtube as the window will fit the video. So I don't see how this should work then. @TuTAH1

@bart1998
Copy link
Contributor Author

bart1998 commented Apr 2, 2024

@ImprovedTube object-fit:contain is the default behaviour of youtube on full screen mode. It will make the video as large as possible without parts going outside of the screen. Though it might be helpful for the not full screen modes that you mentioned

@TuTAH1
Copy link

TuTAH1 commented Apr 4, 2024

In the not full screen mode there are no black bars added by youtube

Non-fullscreen mod have no difference to fullscreen in terms of adding black bars

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants