function() {
		var t = this;
		// Native events
		if (zyMedia.features.nativeFullscreenPrefix != '-') {
			// Chrome doesn't alays fire this in an iframe
			var func = function(e) {
				if (t.isFullScreen) {
					if (!isInFullScreenMode()) {
						t.exitFullScreen()
					}
				}
			};

			document.addEventListener(zyMedia.features.nativeFullscreenPrefix + 'fullscreenchange', func)
		}

		t.fullscreenBtn = document.createElement('div');
		t.fullscreenBtn.className = 'zy_fullscreen_btn';
		t.controls.appendChild(t.fullscreenBtn);

		t.fullscreenBtn.addEventListener('click', function() {
			if ((zyMedia.features.nativeFullscreenPrefix != '-' && isInFullScreenMode()) || t.isFullScreen) {
				t.exitFullScreen()
			} else {
				t.enterFullScreen()
			}
		});
	}
function() {
		var t = this;
		// Native events
		if (zyMedia.features.nativeFullscreenPrefix != '-') {
			// Chrome doesn't alays fire this in an iframe
			var func = function(e) {
				if (t.isFullScreen) {
					if (!isInFullScreenMode()) {
						t.exitFullScreen()
					}
				}
			};

			document.addEventListener(zyMedia.features.nativeFullscreenPrefix + 'fullscreenchange', func)
		}

		t.fullscreenBtn = document.createElement('div');
		t.fullscreenBtn.className = 'zy_fullscreen_btn';
		t.controls.appendChild(t.fullscreenBtn);

		t.fullscreenBtn.addEventListener('click', function() {
			if ((zyMedia.features.nativeFullscreenPrefix != '-' && isInFullScreenMode()) || t.isFullScreen) {
				t.exitFullScreen()
			} else {
				t.enterFullScreen()
			}
		});
	}
function ( ) { var t = this ; // Native events if ( zyMedia . features . nativeFullscreenPrefix != '-' ) { // Chrome doesn't alays fire this in an iframe var func = function ( e ) { if ( t . isFullScreen ) { if ( ! isInFullScreenMode ( ) ) { t . exitFullScreen ( ) } } } ; document . addEventListener ( zyMedia . features . nativeFullscreenPrefix + 'fullscreenchange' , func ) } t . fullscreenBtn = document . createElement ( 'div' ) ; t . fullscreenBtn . className = 'zy_fullscreen_btn' ; t . controls . appendChild ( t . fullscreenBtn ) ; t . fullscreenBtn . addEventListener ( 'click' , function ( ) { if ( ( zyMedia . features . nativeFullscreenPrefix != '-' && isInFullScreenMode ( ) ) || t . isFullScreen ) { t . exitFullScreen ( ) } else { t . enterFullScreen ( ) } } ) ; }
Fullscreen button
Fullscreen button
Add fullscreen event