You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importFullscreenfrom'easy-fullscreen';varfullscreenElement=doucument.getElementById('fullscreen-container');varfullscreenButton=document.getElementById('button');// check if fullscreen enabledif(Fullscreen.isEnabled){fullscreenButton.onclick=function(){// check if is in fullscreen modeif(Fullscreen.isFullscreen){// exit fullscreenFullscreen.exit();}else{// request to enter fullscreenFullscreen.request(fullscreenElement);}};}varonChangeHandler=function(){if(Fullscreen.isFullscreen){console.log('Entered fullscreen');}else{console.log('Exited fullscreen');}};// subscribe to fullscreen change eventFullscreen.on('change',onChangeHandler);// unsubscribe from fullscreen change eventFullscreen.off('change',onChangeHandler);varonErrorHandler=function(e){console.log(e);};// subscribe to fullscreen error eventFullscreen.on('error',onErrorHandler);// unsubscribe from fullscreen error eventFullscreen.off('error',onErrorHandler);