src/bigscreen.js
function videoEnterFullscreen(element) {
		var videoElement = _getVideo(element);

		if (videoElement && videoElement.webkitEnterFullscreen) {
			try {
				if (videoElement.readyState < videoElement.HAVE_METADATA) {
					videoElement.addEventListener('loadedmetadata', function onMetadataLoaded() {
						videoElement.removeEventListener('loadedmetadata', onMetadataLoaded, false);
						videoElement.webkitEnterFullscreen();
						hasControls = !!videoElement.getAttribute('controls');
					}, false);
					videoElement.load();
				}
				else {
					videoElement.webkitEnterFullscreen();
					hasControls = !!videoElement.getAttribute('controls');
				}

				lastVideoElement = videoElement;
			}
			catch (err) {
				return callOnError('not_supported', element);
			}

			return true;
		}

		return callOnError(fn.request === undefined ? 'not_supported' : 'not_enabled', element);
	}
function videoEnterFullscreen(element) {
		var videoElement = _getVideo(element);

		if (videoElement && videoElement.webkitEnterFullscreen) {
			try {
				if (videoElement.readyState < videoElement.HAVE_METADATA) {
					videoElement.addEventListener('loadedmetadata', function onMetadataLoaded() {
						videoElement.removeEventListener('loadedmetadata', onMetadataLoaded, false);
						videoElement.webkitEnterFullscreen();
						hasControls = !!videoElement.getAttribute('controls');
					}, false);
					videoElement.load();
				}
				else {
					videoElement.webkitEnterFullscreen();
					hasControls = !!videoElement.getAttribute('controls');
				}

				lastVideoElement = videoElement;
			}
			catch (err) {
				return callOnError('not_supported', element);
			}

			return true;
		}

		return callOnError(fn.request === undefined ? 'not_supported' : 'not_enabled', element);
	}
function videoEnterFullscreen ( element ) { var videoElement = _getVideo ( element ) ; if ( videoElement && videoElement . webkitEnterFullscreen ) { try { if ( videoElement . readyState < videoElement . HAVE_METADATA ) { videoElement . addEventListener ( 'loadedmetadata' , function onMetadataLoaded ( ) { videoElement . removeEventListener ( 'loadedmetadata' , onMetadataLoaded , false ) ; videoElement . webkitEnterFullscreen ( ) ; hasControls = ! ! videoElement . getAttribute ( 'controls' ) ; } , false ) ; videoElement . load ( ) ; } else { videoElement . webkitEnterFullscreen ( ) ; hasControls = ! ! videoElement . getAttribute ( 'controls' ) ; } lastVideoElement = videoElement ; } catch ( err ) { return callOnError ( 'not_supported' , element ) ; } return true ; } return callOnError ( fn . request === undefined ? 'not_supported' : 'not_enabled' , element ) ; }
Attempt to put a child video into full screen using webkitEnterFullscreen. The metadata must be loaded in order for it to work, so load it automatically if it isn't already.
Attempt to put a child video into full screen using webkitEnterFullscreen . The metadata must be loaded in order for it to work so load it automatically if it isn t already .