zprovoznění přehrávače
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user