Fix Zype player full-screen issue on Wix websites Fix Zype player full-screen issue on Wix websites

Fix Zype player full-screen issue on Wix websites

This article proposes a solution for allowing full-screen functionality on web embeds added to Wix websites.

Add More > Embeds > HTML iframe


Once the embed code is added to your website, you will need to enable Corvid from the top menu. This will unlock the code console on the Preview footer:



The following JavaScript function must be added either at the page level on any page with a Zype player or the site level of the code console for the full screen to work.

// For full API documentation, including code examples, visit
import wixWindow from 'wix-window';


$w.onReady(function () {

// does not change to full screen

// sets flag to *allow* full screen

// code in HtmlComponent will change to full screen



Then you drag an HTML iframe code widget on the page you want the player to be on and use the following code, just replacing the Zype embed code in my example with whatever Zype player you wish to publish.

<!DOCTYPE html>




<meta charset="utf-8">


<title>Font Awesome Icons</title>



<style type="text/css">

.fa_custom { background-color: black ; color: #dfdfdf ; outline:white ; position:absolute;z-index:1}

.fa_custom:hover { background-color: black ; color: #ffffff }

.fa_custom { top: 0; right: 0; }


.fa_custom_exit { background-color: black ; color: #dfdfdf ; outline:white ; position:absolute }

.fa_custom_exit:hover { background-color: black ; color: #ffffff }

.fa_custom_exit { top: 0; right: 0; }



<style type="text/css">

#fullscreen {

background-color: transparent;

padding: 0px;

border: 0px solid #000;




#fullscreen:-webkit-full-screen { width: 100% ; height: 100% ; }

#fullscreen:-webkit-full-screen>button { position:absolute }








<button id="fullscreen-button" class="fa fa-arrows-alt fa_custom" style="font-size:23px"></button>


<div id="fullscreen">


//Replace Example Zype player code below





<button type="button" button id="exit-fullscreen-button" class="fa fa-arrows-alt fa_custom_exit" style="font-size:23px;position:absolute"></button>










var fullscreenButton = document.getElementById("fullscreen-button");

var fullscreenDiv = document.getElementById("fullscreen");

var fullscreenFunc = fullscreenDiv.requestFullscreen;

if (!fullscreenFunc) {



'webkitRequestFullScreen'].forEach(function (req) {

fullscreenFunc = fullscreenFunc || fullscreenDiv[req];




function enterFullscreen() {;



fullscreenButton.addEventListener('click', enterFullscreen);


var exitFullscreen = function () {

if (document.exitFullscreen) {


} else if (document.webkitExitFullscreen) {


} else if (document.mozCancelFullScreen) {


} else if (document.msExitFullscreen) {


} else {

console.log('Fullscreen API is not supported.');




var exitfullscreenButton = document.getElementById('exit-fullscreen-button');


exitfullscreenButton.addEventListener('click', function(e) {