summaryrefslogtreecommitdiff
path: root/www/scripts/videoprojects.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/scripts/videoprojects.js')
-rw-r--r--www/scripts/videoprojects.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/www/scripts/videoprojects.js b/www/scripts/videoprojects.js
new file mode 100644
index 0000000..1879474
--- /dev/null
+++ b/www/scripts/videoprojects.js
@@ -0,0 +1,15 @@
+const playerContainer = document.getElementById("full-video-player");
+const playerVideo = document.getElementById("full-video-player-video");
+const playerCaption = document.getElementById("full-video-player-caption");
+
+function closeFullPlayer() {
+ playerContainer.style.display = "none";
+ playerVideo.pause();
+ playerVideo.currentTime = 0;
+}
+
+function loadVideo(url, caption) {
+ playerContainer.style.display = "flex";
+ playerVideo.src = url;
+ playerCaption.innerHTML = caption;
+}