video: no pause on touch
parent
cfe06ff8cd
commit
0c8bea99c9
|
@ -141,22 +141,6 @@ class VideoContentSetup {
|
||||||
}
|
}
|
||||||
content.element.appendChild(content.videoElement);
|
content.element.appendChild(content.videoElement);
|
||||||
|
|
||||||
// Pause / play on click on mobile
|
|
||||||
let touchAt = 0;
|
|
||||||
content.videoElement.addEventListener("touchstart", (e) => {
|
|
||||||
touchAt = e.timeStamp;
|
|
||||||
});
|
|
||||||
content.videoElement.addEventListener("touchend", (e) => {
|
|
||||||
if (touchAt && e.timeStamp - touchAt < 200) {
|
|
||||||
if (content.videojs.paused()) {
|
|
||||||
content.videojs.play();
|
|
||||||
} else {
|
|
||||||
content.videojs.pause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
touchAt = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
const fileid = content.data.photo.fileid;
|
const fileid = content.data.photo.fileid;
|
||||||
|
|
||||||
// Create hls sources if enabled
|
// Create hls sources if enabled
|
||||||
|
|
Loading…
Reference in New Issue