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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

48 lines
1.1 KiB
JavaScript

class View {
constructor() {
this.init();
}
init() {
this.colorTogglePlaySVG();
this.enableCustomControls();
/* Obarvení aktivního komentáře - dát do special metody */
var mySVG = document.getElementsByClassName("activeIcon")[0];
var svgDoc;
mySVG.addEventListener(
"load",
function () {
svgDoc = mySVG.contentDocument;
svgDoc.getElementById("path4").style.fill = "#ffa800";
},
false
);
}
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");
var svgDoc;
playSVG.addEventListener(
"load",
function () {
svgDoc = playSVG.contentDocument;
svgDoc.getElementById("path4").style.fill = "#ffa800";
},
false
);
}
}