New issue
Advanced search Search tips

Issue 680105 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 670455



Sign in to add a comment

device orientation and screen orientation don't work when a element is fullscreen

Project Member Reported by fbeaufort@chromium.org, Jan 11 2017

Issue description

Chromium Version       : 57.0.2979.0

Events triggered by device orientation Web API and Screen Orientation Web API are not triggered when an element is fullscreen when experimental flag chrome://flags/#video-fullscreen-orientation-lock is enabled.

Here's a code I used for info:

screen.orientation.addEventListener('change', e => {
  console.log('screen.orientation', e);
});
window.addEventListener("orientationchange", e => {
  console.log('orientationchange', screen.orientation);
});
 
Can you give more context? What does "not triggered" mean? What are you doing and what do you expect? :)
I expect Javascript code above to write something in my console when I change my device orientation.
This is not happening sadly when element is in fullscreen. 

This works without flag by the way.
Labels: Needs-Feedback
Can you give explicit STR? :)

My understanding is that you do this:
1. go to page such as youtube.com
2. press fullscreen button
3. video is now locked in landscape
4. you turn your phone in portrait orientation

If that's correct, what you are seeing is the expected result: the screen orientation gives the orientation of the scree, not the device so the screen orientation will not be updated and should stay as 'landscape'. What you call device orientation is also a screen orientation of some sort (only reports angle).

If you want device orientation events, the event name is called "deviceorientation", see https://w3c.github.io/deviceorientation/spec-source-orientation.html
Labels: -Needs-Feedback
Status: WontFix (was: Untriaged)
My bad, I should have used Device Orientation API.

Sign in to add a comment