Request :: FullScreen Mode Event Callback
See original GitHub issueExpected Behavior
just like we can get other values. can we also support Enter and Exit full Screen Mode Events promise support.
Actual Behavior
Not supported yet
Steps to Reproduce
Checked and tested on Playground;
Though i tried to do some manual fullScreen mode testing with
// Note that the API is still vendor-prefixed in browsers implementing it
document.addEventListener("webkitfullscreenchange", function( event ) {
// The event object doesn't carry information about the fullscreen state of the browser,
// but it is possible to retrieve it through the fullscreen API
console.log('yes');
if ( document.fullscreen ) {
console.log('no');
// The target of the event is always the document,
// but it is possible to retrieve the fullscreen element through the API
document.fullscreenElement;
}
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Document: fullscreenchange event - Web APIs | MDN
The fullscreenchange event is fired immediately after the browser switches into or out of fullscreen mode.
Read more >fullscreenchange Event - W3Schools
The fullscreenchange event occurs when an element is viewed in fullscreen mode. ... requestFullscreen() method to view an element in fullscreen mode.
Read more >HTML5 Fullscreen Event Listener - javascript - Stack Overflow
A convenient library-free solution: ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "msfullscreenchange"].
Read more >Document.onfullscreenchange - Web APIs
fullscreenElement . If it's null , the event indicates a transition out of full-screen mode. Otherwise, the specified element is about to take...
Read more >Element.requestFullscreen()
If permission to enter full screen mode is granted, the returned Promise will resolve and the element will receive a fullscreenchange event to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @bdougherty to be very specific, I want to receive full-screen events callback to be able to stop playing video on mobile devices when the user exits full-screen mode.
Thanks.
@luwes - your example doesn’t work in ios safari 12 😦