RESOLVED FIXED204468
A video element cannot enter fullscreen from PiP mode
https://bugs.webkit.org/show_bug.cgi?id=204468
Summary A video element cannot enter fullscreen from PiP mode
Peng Liu
Reported 2019-11-21 13:21:04 PST
A video element cannot enter fullscreen from PiP mode
Attachments
Patch (2.80 KB, patch)
2019-11-21 14:56 PST, Peng Liu
eric.carlson: review+
Patch for landing (2.99 KB, patch)
2020-01-13 21:42 PST, Peng Liu
no flags
Peng Liu
Comment 1 2019-11-21 13:22:03 PST
Peng Liu
Comment 2 2019-11-21 13:54:35 PST
This bug only happens on iPad. When we try to enter fullscreen from PiP, it will show the animation but the video element will be in the inline mode. Also, it will be stuck there and we cannot make further presentation mode changes (to fullscreen/PiP).
Peng Liu
Comment 3 2019-11-21 14:56:58 PST
Jer Noble
Comment 4 2019-11-21 15:48:21 PST
Comment on attachment 384092 [details] Patch This needs an API test before we can land.
Eric Carlson
Comment 5 2019-11-21 16:18:39 PST
Comment on attachment 384092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384092&action=review > Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:1474 > - m_videoFullscreenModel->fullscreenModeChanged(m_currentMode.mode()); > + m_videoFullscreenModel->fullscreenModeChanged(mode); It's probably worth adding a comment about why you are making this change, IOW why does "m_currentMode.mode()" not return "mode" immediately after calling "m_currentMode.setMode(mode)"
Peng Liu
Comment 6 2019-11-21 16:39:07 PST
Comment on attachment 384092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384092&action=review >> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:1474 >> + m_videoFullscreenModel->fullscreenModeChanged(mode); > > It's probably worth adding a comment about why you are making this change, IOW why does "m_currentMode.mode()" not return "mode" immediately after calling "m_currentMode.setMode(mode)" The setMode() implementation is void setMode(HTMLMediaElementEnums::VideoFullscreenMode mode) { m_mode |= mode; } Without the update, m_currentMode will be 3 (both fullscreen and picture-in-picture). It is a strange value for the HTMLVideoElement.
Eric Carlson
Comment 7 2019-11-22 10:09:01 PST
Comment on attachment 384092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384092&action=review >>> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:1474 >>> + m_videoFullscreenModel->fullscreenModeChanged(mode); >> >> It's probably worth adding a comment about why you are making this change, IOW why does "m_currentMode.mode()" not return "mode" immediately after calling "m_currentMode.setMode(mode)" > > The setMode() implementation is > void setMode(HTMLMediaElementEnums::VideoFullscreenMode mode) { m_mode |= mode; } > > Without the update, m_currentMode will be 3 (both fullscreen and picture-in-picture). It is a strange value for the HTMLVideoElement. Please add a comment to the file so someone looking at the code in the future won't change it back.
Peng Liu
Comment 8 2020-01-13 21:29:33 PST
Comment on attachment 384092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384092&action=review >>>> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:1474 >>>> + m_videoFullscreenModel->fullscreenModeChanged(mode); >>> >>> It's probably worth adding a comment about why you are making this change, IOW why does "m_currentMode.mode()" not return "mode" immediately after calling "m_currentMode.setMode(mode)" >> >> The setMode() implementation is >> void setMode(HTMLMediaElementEnums::VideoFullscreenMode mode) { m_mode |= mode; } >> >> Without the update, m_currentMode will be 3 (both fullscreen and picture-in-picture). It is a strange value for the HTMLVideoElement. > > Please add a comment to the file so someone looking at the code in the future won't change it back. Done.
Peng Liu
Comment 9 2020-01-13 21:42:13 PST
Created attachment 387615 [details] Patch for landing
WebKit Commit Bot
Comment 10 2020-01-14 08:37:15 PST
Comment on attachment 387615 [details] Patch for landing Clearing flags on attachment: 387615 Committed r254512: <https://trac.webkit.org/changeset/254512>
Note You need to log in before you can comment on or make changes to this bug.