Document.mozFullScreenEnabled

Reports whether or not full-screen mode is available. Full screen mode is available only for a page that has no windowed plug-ins in any of its documents, and if all <iframe> elements which contain the document have their allowfullscreen attribute set.

Syntax

var isFullScreenAvailable = document.mozFullScreenEnabled;

On return, isFullScreenAvailable is true if the document can be put into full-screen mode.

Example

function requestFullScreen() {
  if (document.mozFullScreenEnabled) {
    videoElement.requestFullScreen();
  } else {
    console.log('your browser cannot use fullscreen right now');
  }
}

Notes

See Using full-screen mode for details and examples.

Browser compatibility

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

Specifications

This method has been proposed in the specification draft

See also

Document Tags and Contributors

 Contributors to this page: teoli, MHasan, cvrebert, kscarfone, Sheppy, fscholz, ziyunfei, ernestd, cpearce
 Last updated by: teoli,