Description[Media controls] Integrate rotate-to-fullscreen with orientation lock
Until now, enabling the video-rotate-to-fullscreen feature required
disabling the video-fullscreen-orientation-lock feature. This patch
makes MediaControlsOrientationLockDelegate aware of
MediaControlsRotateToFullscreenDelegate, specifically when both are
enabled and the user hasn't locked their screen orientation it will only
lock the screen orientation until the user rotates their device to match
the orientation of the video (whereas previously it would hold the lock
until the video stopped being fullscreen). Thus the user will be able to
exit fullscreen by rotating their device back to the opposite
orientation.
The reason this only happens if the user hasn't locked their screen
orientation at the OS level is to make it possible to watch videos
whilst lying in bed with your head at 90 degrees to the usual up
direction.
To help visualize the maths behind the orientation calculations, I wrote
https://jsbin.com/sobopem and https://jsbin.com/rijakaf (view them on a
phone or tablet).
BUG=713225
Review-Url: https://codereview.chromium.org/2890423003
Cr-Commit-Position: refs/heads/master@{#474632}
Committed: https://chromium.googlesource.com/chromium/src/+/0dfadaecdbd95a4babb5b05a3fc50441b0aba845
Patch Set 1 #Patch Set 2 : Fix existing tests #
Total comments: 2
Patch Set 3 : Fix tests and add underscore #Patch Set 4 : Fix gn deps #Patch Set 5 : Rebase #Patch Set 6 : #undef atan2,fmod #Dependent Patchsets: Messages
Total messages: 28 (15 generated)
|