Bug 263822 - [GTK] Fullscreen videos incorrectly fill the screen
Summary: [GTK] Fullscreen videos incorrectly fill the screen
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-28 00:37 PDT by tri.voxel
Modified: 2023-12-06 18:11 PST (History)
3 users (show)

See Also:


Attachments
Screenshots showing described issue (5.91 MB, application/zip)
2023-10-28 00:38 PDT, tri.voxel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tri.voxel 2023-10-28 00:37:05 PDT
#Foreword:

I've noticed quite a glaring issue with WebKitGTK's method of scaling videos while in fullscreen due to now using an "ultrawide" monitor. Before I begin, I want to mention that this bug does not effect the YouTube video player, as YouTube seems to handle video scaling themselves.

#Description of issue:

On videos matching the aspect ration of the monitor ie. 16:9 on 16:9, when fullscreened, it works just fine. However, when the aspect ratio is different, this happens: the video is fit to fill to the height, or width of the display, with the video being snapped to the top and left edge of the video content (not centered).

#Examples:

I have a display that is 9:16 (tall and thin). Said display will put a 16:9 video to where the very far left edge is snapped to the left edge of the monitor, and then the video is scaled vertically such that the top and  bottom edges of the video are touching the top and bottom of the monitor, cutting off all the video content on the right. A second example is with an ultrawide monitor (21:9). A 16:9 video will be scaled so that the video fills the screen horizontally, and has its top edge snapped to the top of the screen, cutting off all the video content on the bottom of the screen. This issue is even more pronounced on video content that is not 16:9, such as square or 4:3. These videos will become almost entirely unviewable while fullscreened.

#Steps to reproduce:

Attempt to fullscreen a video with a different aspect ratio to that of the display, ie. square on 16:9, 16:9 on an ultrawide.

#Expected result:

The video should be centered, and should scale to "fit" the display, not to "fill".

#Additional notes:

Basically, this bug can be witnessed on any site that uses the native browser video player. It can also be observed on Odysee.com, as well as on many other video players. Maybe even on Reddit or X.
Comment 1 tri.voxel 2023-10-28 00:38:34 PDT
Created attachment 468377 [details]
Screenshots showing described issue
Comment 2 Philippe Normand 2023-11-04 02:55:10 PDT
I can't reproduce this on odysee (https://odysee.com/@samtime:1/m3-macbook-pro-parody-%E2%80%9Ctaking-out-the:b) after rotating my screen to 9:16, in fullscreen the player adds (huge) black borders in order to maintain the video aspect ratio. As expected.
Comment 3 Michael Catanzaro 2023-11-13 11:11:35 PST
I can reproduce with a much more boring 16:9 monitor by visiting:

https://www.reddit.com/r/IdiotsInCars/comments/17uc96e/about_3_weeks_ago_this_intersection_was_changed/

and fullscreening that "tall" video.
Comment 4 Philippe Normand 2023-11-17 09:30:10 PST
Works as expected here on my boring non-rotated 16:9 monitor.
Comment 5 Philippe Normand 2023-11-17 09:32:06 PST
(In reply to Philippe Normand from comment #4)
> Works as expected here on my boring non-rotated 16:9 monitor.

That's MiniBrowser from main ^^.

Using Ephy Tech Preview the issue happens indeed.
Using Ephy Canary, no issue.
Comment 6 Philippe Normand 2023-11-17 09:35:24 PST
In any case, I don't think this is a GStreamer-related issue. Seems more like some Fullscreen API issue that might've been fixed in main already.

Might be worth a bisect and backport to 2.42 branch.
Comment 7 Michael Catanzaro 2023-12-06 18:11:23 PST
Bisected this. It's fixed by 266809@main. I've added it to the list of backports for 2.42.4.