Question : exit from fullscreen
Answered by : mentico
const exitBtn = document.getElementById('exit-btn');
exitBtn.addEventListener('click', ()=>{ if (document.fullscreenElement) { document.exitFullscreen(); }
});
Source : https://javascriptf1.com/snippet/exit-from-fullscreen-mode-on-click-in-javascript | Last Update : Wed, 02 Feb 22