mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 15:52:39 -07:00
iOS: bbox: fix video scrubbing;
unlike android, iOS does not eat touch-events in the video controls, so it would switch to the prev/next media on seek instead of seek
This commit is contained in:
parent
acde21d484
commit
dba7c5d4d5
|
|
@ -60,6 +60,15 @@ window.baguetteBox = (function () {
|
||||||
hideOverlay();
|
hideOverlay();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var vtouch = function (e) {
|
||||||
|
var v = vid(),
|
||||||
|
bv = v.getBoundingClientRect(),
|
||||||
|
tp = e.changedTouches[0];
|
||||||
|
|
||||||
|
if (bv.bottom - tp.clientY < 90)
|
||||||
|
touchFlag = true;
|
||||||
|
};
|
||||||
|
|
||||||
var touchstartHandler = function (e) {
|
var touchstartHandler = function (e) {
|
||||||
touch.count = e.touches.length;
|
touch.count = e.touches.length;
|
||||||
if (touch.count > 1)
|
if (touch.count > 1)
|
||||||
|
|
@ -822,6 +831,7 @@ window.baguetteBox = (function () {
|
||||||
if (v == keep)
|
if (v == keep)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
unbind(v, 'touchstart', vtouch, nonPassiveEvent);
|
||||||
unbind(v, 'error', lerr);
|
unbind(v, 'error', lerr);
|
||||||
v.src = '';
|
v.src = '';
|
||||||
v.load();
|
v.load();
|
||||||
|
|
@ -1250,6 +1260,7 @@ window.baguetteBox = (function () {
|
||||||
setloop();
|
setloop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bind(v, 'touchstart', vtouch, nonPassiveEvent);
|
||||||
}
|
}
|
||||||
selbg();
|
selbg();
|
||||||
mp_ctl();
|
mp_ctl();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue