RESOLVED FIXED 101100
[BlackBerry] Automatically go fullscreen on video play
https://bugs.webkit.org/show_bug.cgi?id=101100
Summary [BlackBerry] Automatically go fullscreen on video play
Max Feil
Reported 2012-11-02 14:12:31 PDT
There is a requirement to have HTML5 video automatically enter fullscreen when the video starts playing. This patch implements this feature, with restrictions. The main restriction is adherence to WebKit's philosophy of only entering fullscreen due to a user gesture. This is important in order to avoid pop-up advertisements and other unwanted fullscreen content. One consequence of this is that video elements with the autoplay attribute will not automatically enter fullscreen. Other caveats: - This feature applies only to "small screen" devices where automatically going fullscreen makes more sense. - Fullscreen will only be entered automatically when the video is played from the beginning (current time is zero). It is assumed that if the user is resuming play from a paused state and is not in fullscreen mode, then they exited fullscreen mode intentionally.
Attachments
Patch (11.91 KB, patch)
2012-11-02 14:56 PDT, Max Feil
no flags
Patch (11.91 KB, patch)
2012-11-05 13:13 PST, Max Feil
rwlbuis: review-
Patch (11.91 KB, patch)
2012-11-05 16:55 PST, Max Feil
no flags
Max Feil
Comment 1 2012-11-02 14:56:54 PDT
Antonio Gomes
Comment 2 2012-11-02 16:45:05 PDT
Comment on attachment 172148 [details] Patch It looks good to me. I will let Eric to have a change to look at the cross platform additions
Eric Carlson
Comment 3 2012-11-02 17:26:31 PDT
Comment on attachment 172148 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=172148&action=review Marking r+, but I would prefer the name change. > Source/WebCore/html/HTMLMediaElement.cpp:4544 > +bool HTMLMediaElement::mediaPlayerIsFullscreenRestricted() const > +{ > + return userGestureRequiredForFullscreen() && !ScriptController::processingUserGesture(); > +} I think it would be better to flip the meaning of the name so you ask if fullscreen is allowed instead of restricted. Maybe "mediaPlayerIsFullscreenAllowed", or "mediaPlayerIsFullscreenPermitted"?
Max Feil
Comment 4 2012-11-05 13:13:47 PST
Max Feil
Comment 5 2012-11-05 13:17:41 PST
Comment on attachment 172385 [details] Patch Marking reviewed based on r+ given to previous patch. The only change in this patch is a simple one to rename boolean function mediaPlayerIsFullscreenRestricted() to mediaPlayerIsFullscreenPermitted() and change its sense.
Rob Buis
Comment 6 2012-11-05 14:52:19 PST
Comment on attachment 172385 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=172385&action=review > Source/WebCore/ChangeLog:38 > + (WebCore::MediaPlayerClient::mediaPlayerIsFullscreenRestricted): Hate to be pedantic, but this does not match the renaming.
Max Feil
Comment 7 2012-11-05 16:55:27 PST
Created attachment 172442 [details] Patch Good eye, Rob. I forgot about the change log.
WebKit Review Bot
Comment 8 2012-11-06 07:28:22 PST
Comment on attachment 172442 [details] Patch Clearing flags on attachment: 172442 Committed r133606: <http://trac.webkit.org/changeset/133606>
WebKit Review Bot
Comment 9 2012-11-06 07:28:26 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.