diff --git a/thrimbletrimmer/edit.html b/thrimbletrimmer/edit.html index f163b33..30926f6 100644 --- a/thrimbletrimmer/edit.html +++ b/thrimbletrimmer/edit.html @@ -67,6 +67,13 @@
+
+ +
diff --git a/thrimbletrimmer/images/video-controls/fullscreen.png b/thrimbletrimmer/images/video-controls/fullscreen.png new file mode 100644 index 0000000..664bc2a Binary files /dev/null and b/thrimbletrimmer/images/video-controls/fullscreen.png differ diff --git a/thrimbletrimmer/index.html b/thrimbletrimmer/index.html index d216857..4d243c0 100644 --- a/thrimbletrimmer/index.html +++ b/thrimbletrimmer/index.html @@ -85,6 +85,13 @@
+
+ +
diff --git a/thrimbletrimmer/scripts/common.js b/thrimbletrimmer/scripts/common.js index ffaa568..4752b64 100644 --- a/thrimbletrimmer/scripts/common.js +++ b/thrimbletrimmer/scripts/common.js @@ -240,6 +240,22 @@ function setUpVideoControls() { globalPlayer.currentLevel = +quality.value; }); + const fullscreen = document.getElementById("video-controls-fullscreen"); + fullscreen.addEventListener("click", (_event) => { + if (document.fullscreenElement) { + document.exitFullscreen(); + } else { + videoElement.requestFullscreen(); + } + }); + videoElement.addEventListener("fullscreenchange", (_event) => { + if (document.fullscreenElement) { + videoElement.controls = true; + } else { + videoElement.controls = false; + } + }); + const playbackPosition = document.getElementById("video-controls-playback-position"); playbackPosition.max = videoElement.duration; playbackPosition.value = videoElement.currentTime;