Igalia / meta-webkit

Yocto / OpenEmbedded layer for WebKit based engines and browsers
MIT License
125 stars 69 forks source link

Unable to play videos in a centered position #398

Closed jm-costa closed 1 year ago

jm-costa commented 1 year ago

Hello,

I'm currently using cog v.0.12.4 and the exact same Yocto setup as in https://github.com/Igalia/meta-webkit/issues/395

I run the following commands to open cog and play a video:

export COG_PLATFORM_FDO_VIEW_FULLSCREEN=1
cog -P wl http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4 &

However, it always spawns in a different position. Is there any way to ensure the video widget is always well-centered? If not, can cog play the video, by default, in full screen mode? Without the need to click into the full screen button.

I'm attaching two printscreens hoping it will be helpful to clarify my current situation. Thanks for the support!

wayland-screenshot-2022-09-06_13-04-16 wayland-screenshot-2022-09-06_13-04-01

philn commented 1 year ago

Maybe you can do this with a web-extension, that when loaded, looks for the <video> element in the page and switches it to fullscreen using JS. Cog can load web-extensions.. I don't think there's anything else we can do...

psaavedra commented 1 year ago

@jm-costa please use COG_PLATFORM_WL_VIEW_FULLSCREEN instead of COG_PLATFORM_FDO_VIEW_FULLSCREEN

jm-costa commented 1 year ago

Thanks for the suggestion! It works :)