MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / toggleFullScreen

Function toggleFullScreen

assets/js/video.js:192–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190// If the browser is currently in fullscreen mode,
191// then it should exit and vice versa.
192function toggleFullScreen() {
193 if (document.fullscreenElement) {
194 document.exitFullscreen();
195 } else if (document.webkitFullscreenElement) {
196 // Need this to support Safari
197 document.webkitExitFullscreen();
198 } else if (videoContainer.webkitRequestFullscreen) {
199 // Need this to support Safari
200 videoContainer.webkitRequestFullscreen();
201 } else {
202 videoContainer.requestFullscreen();
203 }
204}
205
206// updateFullscreenButton changes the icon of the full screen button
207// and tooltip to reflect the current full screen state of the video

Callers 1

keyboardShortcutsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected