RESOLVED FIXED 149386
When I check document.webkitFullscreenElement it always returns undefined if I have a video object in fullscreen. It should return the video element.
https://bugs.webkit.org/show_bug.cgi?id=149386
Summary When I check document.webkitFullscreenElement it always returns undefined if ...
Raul Jimenez
Reported 2015-09-20 05:07:41 PDT
Steps to Reproduce: 1. Open http://codepen.io/flower/pen/RPWXOw 2. Click fullscreen button. 3. Click play. Expected Results: It should shows an alert with a message "isFullscreen: true". Check our API for fullscreen for code details: https://github.com/2fdevs/videogular/blob/master/app/scripts/com/2fdevs/videogular/services/vg-fullscreen-api.js Actual Results: It shows an alert with a message "isFullscreen: false". Also not working in at least iOS 8.3 [12F69]. Configuration: iPad Mini 16GB WiFi
Attachments
Jer Noble
Comment 1 2015-09-21 13:56:30 PDT
The Fullscreen API (and thus document.webkitFullscreenElement) is not supported on iOS.
Raul Jimenez
Comment 2 2015-09-22 06:15:43 PDT
(In reply to comment #1) > The Fullscreen API (and thus document.webkitFullscreenElement) is not > supported on iOS. Extracted from Apple documentation: "The document.webkitFullscreenElement property contains the element that is in full-screen mode. Check if this property is defined to determine if the user is currently in full-screen mode. The document.fullscreenEnabled property detects whether the browser supports the full-screen API, not whether an element is currently full-screen." https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html
Raul Jimenez
Comment 3 2015-09-22 06:24:14 PDT
(In reply to comment #2) > (In reply to comment #1) > > The Fullscreen API (and thus document.webkitFullscreenElement) is not > > supported on iOS. > > Extracted from Apple documentation: > > "The document.webkitFullscreenElement property contains the element that is > in full-screen mode. Check if this property is defined to determine if the > user is currently in full-screen mode. The document.fullscreenEnabled > property detects whether the browser supports the full-screen API, not > whether an element is currently full-screen." > > https://developer.apple.com/library/safari/documentation/AudioVideo/ > Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ > ControllingMediaWithJavaScript.html Ok, that seems the Safari Desktop reference, not Safari iOS reference. Then, it's not possible to detect if a video element is in fullscreen mode with JavaScript?
Jer Noble
Comment 4 2015-09-22 07:38:31 PDT
On iOS, you can use video.webkitDisplayingFullscreen, which predates the HTML5 Fullscreen API.
Raul Jimenez
Comment 5 2015-09-22 11:42:09 PDT
(In reply to comment #4) > On iOS, you can use video.webkitDisplayingFullscreen, which predates the > HTML5 Fullscreen API. It worked perfect, thanks :)
Note You need to log in before you can comment on or make changes to this bug.