fenix
fenix copied to clipboard
Videos should autorotate to correct orientation (portrait/landscape)
Why/User Benefit/User Problem
Potrait videos are increasingly common so we should be able to detect potrait/landscape and auto rotate to the correct orientation for users
What/Requirements
Needs GV to give us some information about the video before launching full screen mode, and then probably AC to expose this information to Fenix Opened Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1600962
Acceptance Criteria (how do I know when I’m done?)
Potrait videos launch fullscreen in potrait orientation, landscape in landscape
┆Issue is synchronized with this Jira Task
There are so so many related issues across GeckoView, Focus, Fenix and reference browser. It's also worth linking the equivalent Chromium issue too.
So this one will fix the Instagram story issue? (Instagram stories playing sideways, forcing users to rotate their phone every time they want to watch an Instagram story)
So this one will fix the Instagram story issue? (Instagram stories playing sideways, forcing users to rotate their phone every time they want to watch an Instagram story)
firefox preview nightly version force potrait mode on all videos...
@vesta0 @liuche How much do we want to push on this GV bug? We're relying on them to help us complete this bug.
@boek You may be interested in pushing this forward.
@boek @darkwing this is a great feature that we should put on GV team's radar but in my opinion it is not as urgent as use cases that break user flow and user cannot do anything about it. In this case user can tilt the screen to go into landscape mode.
https://bugs.chromium.org/p/chromium/issues/detail?id=326572 (can't believe that was 2013-2016!)
"correct orientation" is a bit unclear by the way. Here's Google's title: "Force rotation to match aspect ratio of full-screen HTML5 video on Android phones" (but even that title isn't exactly clear as it only affects the native player and not custom players such as JW Player who unfortunately turned down my request :( ). And as I said about a month ago (time goes by too quickly!), I'm pretty sure there are more issues related to this.
@vesta0 some users describe Fenix's native video player as "broken" because of this.
@Poopooracoocoo that's good to know, thank you! Will try to bump it up in priority.
@vesta0 Awesomesauce! Could y'all also update the title of this?
This is scheduled to be worked on and should be available in GeckoView 76.
Question on underlying GV issue needs response. Question asked on 15th April 2020 by @agi90 for @pocmo .
https://bugzilla.mozilla.org/show_bug.cgi?id=1600962#c8
Verified as fixed on the latest Nightly build from 5/22 with Samsung Galaxy Tab A6 (Android 5.1.1), OnePlus 5T (Android 9), Sony Xperia Z5 Premium (Android 7.1.1), and Google Pixel (Android 10). I've tested on several pages: youtube.com, instagram.com, vimeo.com, twitter.com, facebook.com.
not working on http://m.imomoe.in/player/7379-0-0.html
not working on https://www.cmdy5.com/play/24417.html?24417-1-1
not working on https://www.nfmovies.com/video/?47243-1-0.html
not working on iframe videos?
The fix for this issue was handled in AC. Therefore this is not a GeckoView bug.
This is working for me on version 5.2.0-beta.1
and Nightly 200611 06:01
on YouTube and Twitter.
Yeah I believe this works on major sites I tested cnn, youtube, twitter, etc but looks like on certain sites I would guess we aren't getting the height/width metadata correctly (how I am calculating the predicted orientation). We can revisit this, but a future fix might require GV work.
It happens randomly but I have experienced it on YouTube, the videos most of the time auto-rotate to landscape mode ( as most of the YouTube videos are on the channels I have subscribed to) but occasionally the videos don't auto-rotate/go landscape when the full-screen icon is clicked no matter how many time I click the button. The only way to make that particular video auto-rotate/go landscape is to reload the page. Why do you think it might be happening?
Device: Motorola One Power, Android 10.
Fenix: 5.2.0-beta.1
and Nightly 200614 06:01
.
@ekager will do a quick investigation and ask GV if we need more GV work.
Okay interesting - it's a slightly different issue than I was expecting. We are getting the height and width metadata, but we aren't getting the onFullscreenChange
callback that triggers the orientation code.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1647522 with the GV team.
@ekager are you talking to me? Or just replying to this issue's thread.
Just updating this thread generally about those above links never working. Still not sure about the youtube videos intermittently not rotating, but it's quite possibly related.
Is there a way to turn off this auto-rotation happiness? Since the update to the new app version (v79), YouTube videos with a landscape aspect ratio seem to be locked to landscape mode, but sometimes I prefer to watch them in portrait mode anyways. One use case, for example, is playing a video in the background while doing something else, so frame size is not that important, and it can save battery life on OLED screens. I think that full screen mode should respect the current rotation of the device rather than force-overriding it with what it thinks is best for video display. If I'm holding my device in portrait orientation, there's a reason for it. I see the value in auto-rotation, but at least make it optional.
Another variant https://github.com/webcompat/web-bugs/issues/62199
See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
There are also fold devices to consider: the fold screen may have a seam in the middle, so some videos look better in portrait mode while others are better watched in landscape. Is there any way to force fullscreen video rotation or are there any plans to implement such switch?
I'm sorry if this repository or this particular issue is not the appropriate place to ask, but I could not find the better alternative.
I believe that this behavior is already gated behind an about:config option: media.videocontrols.lock-video-orientation
Of course, the behavior is outright broken for the moment! Once fixed, though, fold users can choose to disable the behavior if they find it bothersome by toggling the aforementioned option to false
.
The issue is still reproducible using the latest build of Firefox Release and Nightly. The issue reproduces 8/10 times.
Tested with:
Browser / Version: Firefox Release 104.2.0 (2015902899-🦎104.0.2-20220902153754🦎 )/ Firefox Nightly 106.0a1 (2015904939-🦎106.0a1-20220918094414🦎)/ Chrome Mobile Version 105.0.5195.124 Operating System: Samsung A51 (Android 11) -1080 × 2400 pixels 20:9 aspect ratio (~405 ppi density) Operating System: Google Pixel 3 (Android 12) -1080 x 2160 pixels, 18:9 ratio (~443 ppi density)
Notes:
- Reproducible regardless of the status of ETP.
- Reproducible on the latest build of Firefox Nightly and Release.
- Works as expected using Chrome.