document.mozFullScreenElement Redirect 1

« DOM Reference


Returns the Element that is currently being presented in full-screen mode in this document, or null if full-screen mode is not currently in use.


var element = document.mozFullScreenElement;

On return, element is the element that is currently in full-screen mode, or null if full-screen mode isn't currently in use by the document.



function isVideoInFullsreen() {
  if (document.mozFullScreenElement && document.mozFullScreenElement.nodeName == 'VIDEO') {
    console.log('Your video is playing in fullscreen');


See Using full-screen mode for details and examples.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? 9.0 (9.0) ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 9.0 (9.0) ? ? ?


This method has been proposed in the specification draft

See also

Document Tags and Contributors

Last updated by: Sheppy,