Added no videoID = redir to dir.html and fixed comment

This commit is contained in:
tika 2022-11-04 14:30:20 +01:00
parent 807825838f
commit bbda2e4cb2
1 changed files with 6 additions and 1 deletions

View File

@ -2,11 +2,16 @@ new URL(location.href).searchParams.get('video')
const params = new URL(location.href).searchParams;
const videoID = params.get('video');
//redirect to directory if no ${videoID} given
const urlContainParams = window.location.search.length === 0;
if (urlContainParams) window.location.href = 'dir.html';
console.log("Good Day!");
console.log("Attempting to load Content!");
console.log(`using video ID:"${videoID}"`);
//Set Thumbnail of Videoi based on ${videoID}
//Set Thumbnail of Video based on ${videoID}
document.getElementById("media").setAttribute("poster", `vidSrc/Video/${videoID}/thumb.png`);
console.log("Setting Thumbnail");