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

[Enhancement] Video cover entire player area (ie. No black bars) #1880

Open
stranger-danger-zamu opened this issue Mar 10, 2021 · 8 comments · May be fixed by #4439
Open

[Enhancement] Video cover entire player area (ie. No black bars) #1880

stranger-danger-zamu opened this issue Mar 10, 2021 · 8 comments · May be fixed by #4439
Labels
enhancement Improvement of an existing feature type:client-side The user interface of invidious

Comments

@stranger-danger-zamu
Copy link

Is your enhancement request related to a problem? Please describe.
Videos have black bars instead of scaling to cover whatever space they need to fit into the browser window.

Describe the solution you'd like
Changing the /assests/css/default.css file to make videos cover the space and have no black bars.
Specifically the changes needed to achieve this are:

diff --git a/assets/css/default.css b/assets/css/default.css
index 793295d..8c70960 100644
--- a/assets/css/default.css
+++ b/assets/css/default.css
@@ -237,11 +237,11 @@ input[type="search"]::-webkit-search-cancel-button {
 
 @media only screen and (max-aspect-ratio: 16/9) {
   .player-dimensions.vjs-fluid {
-    padding-top: 46.86% !important;
+/*     padding-top: 46.86% !important; */
   }
 
   #player-container {
-    padding-bottom: 46.86% !important;
+/*     padding-bottom: 46.86% !important; */
   }
 }
 
@@ -453,7 +453,7 @@ span > select {
 }
 
 .player-dimensions.vjs-fluid {
-  padding-top: 82vh;
+/*   padding-top: 82vh; */
 }
 
 video.video-js {
@@ -463,8 +463,8 @@ video.video-js {
 
 #player-container {
   position: relative;
-  padding-bottom: 82vh;
-  height: 0;
+/*   padding-bottom: 82vh; */
+/*   height: 0; */
 }
 
 .pure-control-group label {
@@ -630,4 +630,4 @@ body.dark-theme {
 
 #filters {
   display: none;
-}
\ No newline at end of file
+}

Describe alternatives you've considered
Something like a user setting that allows the addition of custom user CSS that gets evaluated last.

Additional context
I just commented out the CSS blocks necessary and haven't done thorough testing to see if it breaks any other features. I did however use Google Chrome's device toolbar to emulate all the devices and checked for any weirdness. From what I can tell it worked perfectly fine.

Also didn't submit this as a PR since I wasn't sure if this was done for some reason.

@stranger-danger-zamu stranger-danger-zamu added the enhancement Improvement of an existing feature label Mar 10, 2021
@TheFrenchGhosty
Copy link
Member

Can you share some screenshot of the results? If it works fine you should definitely open a PR.

@stranger-danger-zamu
Copy link
Author

Black Bars:
image

No Black Bars:
image

Some videos still have issues (eg. LTT uses a strange aspect ratio), but that's also just removing more padding and height CSS definitions and then they have no black bars. A lot of the issues seem to originate from the .vjs-* video classes, so it might be a upstream issue more than a this project issue.

I don't really have the time to delve into this more to do a full pull request if it's based on an upstream CSS dependency.

@TheFrenchGhosty
Copy link
Member

Can you open a PR as is? I might be able to do some more testing

@SamantazFox
Copy link
Member

Wouldn't it be better to initially set the player size (as what youtube does) according to the video's dimensions?

Because just cropping out some parts of the video with CSS seems to me a bit brutal, and may remove important infos (especially on e-learning videos).

@obscurerev
Copy link

I personally like the black bars if anything else.

@stranger-danger-zamu
Copy link
Author

cropping out some parts of the video

No one is talking about cropping out any part of the video. These are blank spaces because the video's aspect ratio is incorrect.

@stranger-danger-zamu
Copy link
Author

Also, this does seem to be a upstream bug that they instead have users "fix" through configuration instead of having the library properly utilize the video data.

@syeopite
Copy link
Member

Still an issue

@iv-org iv-org deleted a comment from github-actions bot Oct 25, 2023
@unixfox unixfox linked a pull request Feb 19, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of an existing feature type:client-side The user interface of invidious
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants