style for webkit browsers
This commit is contained in:
@@ -47,6 +47,10 @@ article {
|
|||||||
padding: 4vh 5vw 4vh 2vw;
|
padding: 4vh 5vw 4vh 2vw;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
article img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 25vh;
|
||||||
|
}
|
||||||
|
|
||||||
article h1:first-child {
|
article h1:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@@ -153,6 +157,14 @@ progress::-moz-progress-bar {
|
|||||||
background-color: #616161;
|
background-color: #616161;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
progress::-webkit-progress-value {
|
||||||
|
background-color: #616161;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress::-webkit-progress-bar {
|
||||||
|
background-color: #616161;
|
||||||
|
}
|
||||||
|
|
||||||
.seek {
|
.seek {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
@@ -171,12 +183,25 @@ progress::-moz-progress-bar {
|
|||||||
|
|
||||||
.seek::-moz-range-thumb {
|
.seek::-moz-range-thumb {
|
||||||
background-color: #ffa800;
|
background-color: #ffa800;
|
||||||
|
min-width: 24px;
|
||||||
width: 2vh;
|
width: 2vh;
|
||||||
|
min-height: 24px;
|
||||||
height: 2vh;
|
height: 2vh;
|
||||||
border-radius: 2vh;
|
border-radius: max(24px, 2vh);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.seek::-webkit-slider-thumb {
|
||||||
|
background-color: #ffa800;
|
||||||
|
min-width: 24px;
|
||||||
|
width: 2vh;
|
||||||
|
min-height: 24px;
|
||||||
|
height: 2vh;
|
||||||
|
border-radius: max(24px, 2vh);
|
||||||
|
border: none;
|
||||||
|
appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
.videoComment {
|
.videoComment {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #ffa800;
|
background-color: #ffa800;
|
||||||
|
|||||||
@@ -63,6 +63,12 @@ class Controller {
|
|||||||
|
|
||||||
const seek = document.getElementById("seek");
|
const seek = document.getElementById("seek");
|
||||||
seek.addEventListener("input", this.view.videoPlayer.skipAhead);
|
seek.addEventListener("input", this.view.videoPlayer.skipAhead);
|
||||||
|
|
||||||
|
document.addEventListener("keyup", function (e) {
|
||||||
|
if (e.keyCode == 32) {
|
||||||
|
this.view.videoPlayer.togglePlay();
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadVideo(v) {
|
async loadVideo(v) {
|
||||||
@@ -89,17 +95,16 @@ class Controller {
|
|||||||
|
|
||||||
getActiveComment() {
|
getActiveComment() {
|
||||||
const video = document.getElementById("video");
|
const video = document.getElementById("video");
|
||||||
let currentTime = Math.round(video.currentTime);
|
let currentTime = video.currentTime;
|
||||||
|
|
||||||
for (let i = 0; i < this.model.comments.length; i++) {
|
for (let i = 0; i < this.model.comments.length; i++) {
|
||||||
if (
|
if (
|
||||||
currentTime > this.model.comments[i].start &&
|
currentTime > this.model.comments[i].start &&
|
||||||
currentTime < this.model.comments[i].end
|
currentTime < this.model.comments[i].end
|
||||||
) {
|
) {
|
||||||
console.log("active: " + i);
|
|
||||||
this.view.activateComment(i);
|
this.view.activateComment(i);
|
||||||
this.view.activateCommentText(this.model.comments[i].fulltext);
|
this.view.activateCommentText(this.model.comments[i].fulltext);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.view.activateComment(null);
|
this.view.activateComment(null);
|
||||||
this.view.activateCommentText(null);
|
this.view.activateCommentText(null);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class VideoPlayer {
|
|||||||
// Posouvání ve videu
|
// Posouvání ve videu
|
||||||
skipAhead() {
|
skipAhead() {
|
||||||
const progressBar = document.getElementById("progress-bar");
|
const progressBar = document.getElementById("progress-bar");
|
||||||
video = document.getElementById("video");
|
const video = document.getElementById("video");
|
||||||
|
|
||||||
let skipTo = this.value;
|
let skipTo = this.value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user