Closed Bug 1520513 Opened 6 years ago Closed 5 years ago

Videos aren't auto rotated on mobile depending on screen size

Categories

(Firefox for Android Graveyard :: Audio/Video, defect, P3)

Firefox 66
ARM
Android
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: csheany, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Android 7.1.1; Tablet; rv:66.0) Gecko/66.0 Firefox/66.0

Steps to reproduce:

  1. Open mozilla.org/en-us/firefox
  2. Play a video
  3. Enter fullscreen

Actual results:

The video is in portrait.

Expected results:

The video should be in landscape.

I was able to reproduce the issue.
Tested on the latest Nightly 66.0a1 (2019-01-16) on Sony Xperia Z2 (Android 6.0.1).
I will confirm the issue.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Hardware: Unspecified → ARM

Ran a regression:

Last good revision: 654c9274673479fc772eef2f8a3002982e931a62
First bad revision: 895cc0297ce2e47092dc5736cd444a573ba03ed2

Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=654c9274673479fc772eef2f8a3002982e931a62&tochange=895cc0297ce2e47092dc5736cd444a573ba03ed2

Keywords: regression

Hi, from what I see, it seems that this issue is caused by the same bug as bug 1520455. Please consider that in your investigation, thanks.

Hiro, can you take a look?

Flags: needinfo?(hikezoe)

Sure.

On my environments some of videos on mozilla.org/en-us/firefox has been originally played in portrait on fullscreen. So I don't know what the problem is actually, but I believe bug 1520455 also fixed this issue.

csheany, can you still see the issue on nightly?

Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
Flags: needinfo?(hikezoe) → needinfo?(csheany)

I am still seeing the issue.

It seems to depend on screen size.

I was going to edit the summary.

To confirm, are you playing the video first?

Flags: needinfo?(csheany)

Yeah, I did play the video then pushed the fullscreen icon. Anyway, that's odd bug 1520455 made bug 1423013 (which regressed this) completely off on fullscreen state. The latest nightly hasn't included the fix for bug 1520455 yet? Let me check it.

Blocks: 1423013

I've confirmed the latest nightly (rev: f0c23db0d035) has included bug 1520455. It seems that the issue happens only on Tablet.

CCing timdream, we might need to tweak toolkit side due to bug 1423013. Given that since bug 1520455 we no longer use the minimum scale size on fullscreen state but the problem still persists, that mean that the orientation change depends on the layout viewport size before fullscreen? Just a guess.

csheany, what is your device screen size? I can't yet reproduce on an Android emulator that the screen size is 1280x800.

Flags: needinfo?(csheany)

The tablet is 1024x768 however I notice it when the window is 512x384.

Flags: needinfo?(csheany)

No luck on 1024x768 or on 512x384 either. I've been trying both of desktop and mobile versions of the site.

miralobontiu, would you mind helping me to reproduce this issue on Android emulators? Oh I just noticed that Xperia Z2 isn't table at all. I have a similar device, Z3 Compact, so it should be reproducible on my phone.

Flags: needinfo?(mirabela.lobontiu)

1024x768 isn't affected.

The other dimensions should have been 768x512.

Thanks, I will try 768x512. That's said, I started suspecting the regression range was misidentified due to bug 1423013.

IIUC, the orientation change happens based on the video element's videoHeight and videoWidth, so it shouldn't be affected by the minimum scale change.

Can't reproduce it on 768x512 either.

Hey csheany, can you please query the videoHeight and videoWidth values? It should be; videoHeight:1080 and videoWidth:1920 for the first video on the site.

You can use about:debugging and connect with the device and run document.fullscreenElement.videoHeight or document.fullscreenElement.videoWidth on fullscreen state.

I appreciate your efforts.

Unfortunately that is beyond my capacity.

Would the page source provide that information?

Never mind, then. Also the place I linked in comment 14 is used only if media.videocontrols.lock-video-orientation is true, so it's not related at all, I suppose.

Hi,

I wasn`t able to reproduce the issue anymore on Sony Xperia Z2 (Android 6.0.1), a tablet which has 1080 x 1920 pixels, 16:9 ratio (~424 ppi pixel density).
Tested on the latest Nightly 66.0a1 (2019-01-23), on Beta 65.0b13 and RC 65.0.

I will remove the NI.

Thanks!

Flags: needinfo?(mirabela.lobontiu)

miralobontiu (or Stefan), would you mind finding which commit fixed this too? I think the issue what you guys saw was fixed by bug 1520455, and I guess the problem csheany reported is originally different from the one. Thanks!

Flags: needinfo?(stefan.deiac)
Flags: needinfo?(mirabela.lobontiu)

I believe it is the same issue.

It wouldn't work at all without the pref you mentioned in Comment 18.

Summary: Videos aren't auto rotated on mobile → Videos aren't auto rotated on mobile depending on screen size

I am confused. Can you please clarify steps to reproduce? The problem happens only if media.videocontrols.lock-video-orientation is false, right? Then I can see the issue on Beta and Release on my phone (with portrait mode).

Flags: needinfo?(csheany)

Also it would be nice to confirm whether your issue regressed by bug 1423013.

The STR haven't changed.

If the pref is false video doesn't auto rotate.

I'm not sure if it was caused by Bug 1423013.

Flags: needinfo?(csheany)

Great. I am pretty sure that the issue you are seeing is not a regression caused by bug 1423013. (Probably it's not a regression, I guess) Unassigning myself. Also I am degrading the priority. (Please feel free to re-upgrade if someone thinks this should be high priority)

Assignee: hikezoe → nobody
No longer blocks: 1423013
Status: ASSIGNED → NEW
Keywords: regression
Priority: P1 → P3

Probably we won't fix this issue on Firefox 64 and 65 either.

Summary: Videos aren't auto rotated on mobile depending on screen size → Videos aren't auto rotated on mobile depending on screen size if media.videocontrols.lock-video-orientation is false

If the pref is false, it is not expected to.

Summary: Videos aren't auto rotated on mobile depending on screen size if media.videocontrols.lock-video-orientation is false → Videos aren't auto rotated on mobile depending on screen size

Are you saying the the issue happens if the pref value is true? Just to confirm the issue happens on Firefox 64?

Also please note the conditions when the problem happens. The pref value and the orientation of the device (I supposed you are using the device as portrait mode).

Correct.

What are you seeing on 64?

to confirm, the 'correct' means that you are seeing the issue on Firefox 64 as well and the pref value is true, right?

I can see the issue only if the pref is false on Firefox 64. So that means I can't reproduce your issue at all.

In my case, with multi-window the device is in "landscape" and Firefox is in "portrait" and the pref is true.

I took that to be reprentative of mobile/phone which from Mira and Stefan's comments was accurate to a degree.

multi-window! I've never tried it. :/ Probably it's the key factor.

Summary: Videos aren't auto rotated on mobile depending on screen size → Videos aren't auto rotated on mobile depending on screen size with multi-window mode

We should reset the bug status.

Status: NEW → UNCONFIRMED
Ever confirmed: false

Correct that the pref value is true.

I have only tested Nightly.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #20)

miralobontiu (or Stefan), would you mind finding which commit fixed this too? I think the issue what you guys saw was fixed by bug 1520455, and I guess the problem csheany reported is originally different from the one. Thanks!

Hi guys!

I found which commit fixed this issue: https://hg.mozilla.org/mozilla-central/log/f0c23db0d035dbe81e23eb4d619e493e38582d24 - it was the one from 22nd of January 2019.
I tested with Sony Xperia Z2 (Android 6.0.1).

If I can help you with other information, please let me know.

Thank you!

Flags: needinfo?(stefan.deiac)
Flags: needinfo?(mirabela.lobontiu)
Component: General → Audio/Video

If there was an issue in a normal environment and can no longer be reproduced that...

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Summary: Videos aren't auto rotated on mobile depending on screen size with multi-window mode → Videos aren't auto rotated on mobile depending on screen size
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.