New issue
Advanced search Search tips

Issue 736942 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-XR
Proj-XR-VR



Sign in to add a comment

Vr Shell can change orientation after entering fullscreen

Project Member Reported by amp@chromium.org, Jun 26 2017

Issue description

So far I have only repro'ed this on Youtube.

Steps
1. Visit m.youtube.com and start a video (assumes you are holding the phone in portrait orientation)
2. Enter vr (either through --vr-shell-dev flag or through daydream insertion), vr auto rotates to landscape orientation
3. Enter fullscreen (using the media controls on the video).
4. Rotate the phone back to portrait while still in VR

Expected:
Phone stays in landscape orientation with the vr views showing the tilted view in both eyes

Actual:
Phone switches to portrait orientation and appears to try and split the screen vertically for the vr views.  See attached screenshot.


I haven't been able to reproduce this with other html5 based videos
 
Screenshot (Jun 26, 2017 4-48-33 PM).png
339 KB View Download
Owner: billorr@chromium.org
I believe this is interference from the "fullscreen video locks orientation" feature (MediaControlsOrientationLockDelegate.cpp).

There is a ScreenOrientationProvider that manages setting orientation on behalf of Chrome, but in VrShellDelegate we call the activity#setRequestedOrientation ourselves.  We should ensure that ScreenOrientationProvider can handle simultaneous requests (maybe with some kind of prioritization), and ensure that VrShell goes through this common class.

I can make a fix for this tomorrow.
Status: Started (was: Untriaged)

Comment 3 by amp@chromium.org, Jul 10 2017

Issue 740708 has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3

commit 4d1e2413ab6bf7c497c24178a12c03bc79b32ca3
Author: Bill Orr <billorr@chromium.org>
Date: Wed Jul 19 23:01:27 2017

Fix interaction between content orientation and VR

VR Shell needs to set a landscape orientation as part of the contract
with GVR. Currently ScreenOrientationProvider also sets the activities'
orientation in some situations, such as fullscreen video playback.
This leads to conflicts where a fullscreen video starts playing in VR
and then the orientation is no-longer locked to landscape.

This fix is to disable any other code from setting orientation
preferences while in VR.  Unlocking orientation will update the orientation
that VR will restore to.

BUG= 736942 

Change-Id: I3c52c6c3c2673eec5f9bdf091e3e8da70198df3a
Reviewed-on: https://chromium-review.googlesource.com/571099
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488023}
[modify] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
[modify] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/content/browser/screen_orientation/screen_orientation_delegate_android.cc
[modify] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/content/public/android/BUILD.gn
[modify] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java
[add] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/content/public/android/java/src/org/chromium/content_public/browser/ScreenOrientationDelegate.java
[add] https://crrev.com/4d1e2413ab6bf7c497c24178a12c03bc79b32ca3/content/public/android/java/src/org/chromium/content_public/browser/ScreenOrientationDelegateManager.java

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified fixed in 61.0.3163.27

Sign in to add a comment