summaryrefslogtreecommitdiff
path: root/www/scripts/videoprojects.js
blob: 019403f54411571526afe3e69ae5d5497f912c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const playerContainer = document.getElementById("full-video-player");
const playerVideo = document.getElementById("full-video-player-video");
const playerCaption = document.getElementById("full-video-player-caption");
const playerButton = document.getElementById("full-video-player-button")

function closeFullPlayer() {
	playerContainer.style.display = "none";
	playerVideo.pause();
	playerVideo.currentTime = 0;
}

function loadVideo(url, caption, videoPath) {
	playerContainer.style.display = "flex";
	playerVideo.src = url;
	playerCaption.innerHTML = caption;
	playerButton.href = `/video/${videoPath}/`
}