watch.js: video variable as const and improve data.time_start syntax
This commit is contained in:
parent
7143e1b321
commit
06e091e020
@ -1,4 +1,4 @@
|
|||||||
var video = document.getElementById('js-video-player');
|
const video = document.getElementById('js-video-player');
|
||||||
|
|
||||||
function changeQuality(selection) {
|
function changeQuality(selection) {
|
||||||
var currentVideoTime = video.currentTime;
|
var currentVideoTime = video.currentTime;
|
||||||
@ -40,8 +40,7 @@ document.getElementById('quality-select').addEventListener(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Set up video start time from &t parameter
|
// Set up video start time from &t parameter
|
||||||
if (data.time_start != 0 && video)
|
if (data.time_start != 0 && video) {video.currentTime = data.time_start};
|
||||||
video.currentTime = data.time_start;
|
|
||||||
|
|
||||||
// External video speed control
|
// External video speed control
|
||||||
var speedInput = document.getElementById('speed-control');
|
var speedInput = document.getElementById('speed-control');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user