zprovoznění přehrávače

This commit is contained in:
2021-01-26 00:51:01 +01:00
parent db9c865b86
commit 0e5089afd6
9 changed files with 244 additions and 43 deletions

View File

@@ -1,9 +1,28 @@
class Controller {
constructor() {
constructor(model, view) {
this.model = model;
this.view = view;
this.init();
}
init() {
// Get video code
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
this.videoToLoad = urlParams.get("v");
this.loadVideo(this.videoToLoad);
}
}
loadVideo(v) {
let video = document.getElementById("video");
console.log(video)
video.children[0].src = "./videos/" + v + ".webm";
video.load();
console.log("here");
}
}