bugfix v0ck
This commit is contained in:
parent
0d4d150792
commit
83fbc557e8
|
@ -55,8 +55,8 @@ class v0ck {
|
||||||
init(elem) {
|
init(elem) {
|
||||||
const player = document.querySelector('.v0ck');
|
const player = document.querySelector('.v0ck');
|
||||||
const video = elem;
|
const video = elem;
|
||||||
video.removeAttribute('autoplay');
|
|
||||||
video.removeAttribute('controls');
|
video.removeAttribute('controls');
|
||||||
|
video.removeAttribute('autoplay');
|
||||||
const progress = player.querySelector('.v0ck_progress');
|
const progress = player.querySelector('.v0ck_progress');
|
||||||
const progressBar = player.querySelector('.v0ck_progress_filled');
|
const progressBar = player.querySelector('.v0ck_progress_filled');
|
||||||
const toggle = player.querySelector('.v0ck_toggle');
|
const toggle = player.querySelector('.v0ck_toggle');
|
||||||
|
@ -159,10 +159,7 @@ class v0ck {
|
||||||
skipButtons.forEach(button => button.addEventListener('click', skip));
|
skipButtons.forEach(button => button.addEventListener('click', skip));
|
||||||
ranges.forEach(range => range.addEventListener('change', handleRangeUpdate));
|
ranges.forEach(range => range.addEventListener('change', handleRangeUpdate));
|
||||||
ranges.forEach(range => range.addEventListener('mousemove', handleRangeUpdate));
|
ranges.forEach(range => range.addEventListener('mousemove', handleRangeUpdate));
|
||||||
progress.addEventListener('click', scrub);
|
progress.addEventListener('mousedown', scrub);
|
||||||
progress.addEventListener('mousemove', e => mousedown && scrub(e));
|
|
||||||
progress.addEventListener('mousedown', () => mousedown = true);
|
|
||||||
progress.addEventListener('mouseup', () => mousedown = false);
|
|
||||||
fullscreen.addEventListener('click', toggleFullScreen);
|
fullscreen.addEventListener('click', toggleFullScreen);
|
||||||
document.addEventListener('fullscreenchange', toggleFullScreenClasses);
|
document.addEventListener('fullscreenchange', toggleFullScreenClasses);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user