|
|
@ -27,6 +27,7 @@ class Controller {
|
|
|
|
this.loadXml(videoToLoad).then(
|
|
|
|
this.loadXml(videoToLoad).then(
|
|
|
|
function (v) {
|
|
|
|
function (v) {
|
|
|
|
this.view.drawCommentsText(v);
|
|
|
|
this.view.drawCommentsText(v);
|
|
|
|
|
|
|
|
this.addEventListeners();
|
|
|
|
this.view.drawCommentsToVideo(v);
|
|
|
|
this.view.drawCommentsToVideo(v);
|
|
|
|
}.bind(this)
|
|
|
|
}.bind(this)
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -79,6 +80,26 @@ class Controller {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addEventListeners() {
|
|
|
|
|
|
|
|
let comments = document.getElementsByClassName("comment");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < comments.length; i++) {
|
|
|
|
|
|
|
|
comments[i].addEventListener(
|
|
|
|
|
|
|
|
"mouseover",
|
|
|
|
|
|
|
|
function () {
|
|
|
|
|
|
|
|
this.view.commentHover(comments[i].firstChild);
|
|
|
|
|
|
|
|
}.bind(this)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
comments[i].addEventListener(
|
|
|
|
|
|
|
|
"mouseout",
|
|
|
|
|
|
|
|
function () {
|
|
|
|
|
|
|
|
if (!comments[i].classList.contains("activeComment"))
|
|
|
|
|
|
|
|
this.view.commentHover(comments[i].firstChild, false);
|
|
|
|
|
|
|
|
}.bind(this)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async loadVideo(v) {
|
|
|
|
async loadVideo(v) {
|
|
|
|
let video = document.getElementById("video");
|
|
|
|
let video = document.getElementById("video");
|
|
|
|
|
|
|
|
|
|
|
|