You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
538 B
JavaScript
29 lines
538 B
JavaScript
class Controller {
|
|
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");
|
|
}
|
|
}
|