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

@@ -4,8 +4,9 @@ class View {
}
init() {
this.colorTogglePlaySVG();
this.enableCustomControls();
//this.colorTogglePlaySVG();
this.videoPlayer = new VideoPlayer();
/* Obarvení aktivního komentáře - dát do special metody */
@@ -21,19 +22,10 @@ class View {
);
}
enableCustomControls() {
const video = document.getElementById("video");
const videoControls = document.getElementById("video-controls");
const videoWorks = !!document.createElement("video").canPlayType;
if (videoWorks) {
video.controls = false;
videoControls.classList.remove("hidden");
}
}
colorTogglePlaySVG() {
var playSVG = document.getElementById("togglePlay");
/* colorTogglePlaySVG() {
var playSVG = document.getElementById("togglePlayIcon");
var svgDoc;
playSVG.addEventListener(
"load",
@@ -43,5 +35,5 @@ class View {
},
false
);
}
} */
}