mirror of
https://github.com/9001/copyparty.git
synced 2026-01-13 08:12:39 -07:00
Merge 23e9c2c524 into ae56f3bdae
This commit is contained in:
commit
f396b16386
|
|
@ -28,7 +28,7 @@ window.baguetteBox = (function () {
|
||||||
onChange: null,
|
onChange: null,
|
||||||
readDirRtl: false,
|
readDirRtl: false,
|
||||||
},
|
},
|
||||||
overlay, slider, btnPrev, btnNext, btnHelp, btnAnim, btnRotL, btnRotR, btnSel, btnFull, btnZoom, btnVmode, btnReadDir, btnClose,
|
overlay, slider, btnPrev, btnNext, btnHelp, btnAnim, btnRotL, btnRotR, btnSel, btnFull, btnZoom, btnVmode, btnReadDir, btnSpeed, btnClose,
|
||||||
currentGallery = [],
|
currentGallery = [],
|
||||||
currentIndex = 0,
|
currentIndex = 0,
|
||||||
isOverlayVisible = false,
|
isOverlayVisible = false,
|
||||||
|
|
@ -46,6 +46,7 @@ window.baguetteBox = (function () {
|
||||||
documentLastFocus = null,
|
documentLastFocus = null,
|
||||||
isFullscreen = false,
|
isFullscreen = false,
|
||||||
vmute = false,
|
vmute = false,
|
||||||
|
vspeed = sread('vspeed') || 1.0,
|
||||||
vloop = sread('vmode') == 'L',
|
vloop = sread('vmode') == 'L',
|
||||||
vnext = sread('vmode') == 'C',
|
vnext = sread('vmode') == 'C',
|
||||||
loopA = null,
|
loopA = null,
|
||||||
|
|
@ -317,6 +318,7 @@ window.baguetteBox = (function () {
|
||||||
'<button id="bbox-full" type="button" tt="full-screen">⛶</button>' +
|
'<button id="bbox-full" type="button" tt="full-screen">⛶</button>' +
|
||||||
'<button id="bbzoom" type="button" tt="zoom/stretch">z</button>' +
|
'<button id="bbzoom" type="button" tt="zoom/stretch">z</button>' +
|
||||||
'<button id="bbox-vmode" type="button" tt="a"></button>' +
|
'<button id="bbox-vmode" type="button" tt="a"></button>' +
|
||||||
|
'<button id="bbox-vspeed" type="button" tt="playback speed">1x</button>' +
|
||||||
'<button id="bbox-close" type="button" aria-label="Close">X</button>' +
|
'<button id="bbox-close" type="button" aria-label="Close">X</button>' +
|
||||||
'</div></div>'
|
'</div></div>'
|
||||||
);
|
);
|
||||||
|
|
@ -336,6 +338,7 @@ window.baguetteBox = (function () {
|
||||||
btnFull = ebi('bbox-full');
|
btnFull = ebi('bbox-full');
|
||||||
btnZoom = ebi('bbzoom');
|
btnZoom = ebi('bbzoom');
|
||||||
btnVmode = ebi('bbox-vmode');
|
btnVmode = ebi('bbox-vmode');
|
||||||
|
btnSpeed = ebi('bbox-vspeed');
|
||||||
btnClose = ebi('bbox-close');
|
btnClose = ebi('bbox-close');
|
||||||
|
|
||||||
bcfg_bind(options, 'bbzoom', 'bbzoom', false, setzoom);
|
bcfg_bind(options, 'bbzoom', 'bbzoom', false, setzoom);
|
||||||
|
|
@ -522,6 +525,29 @@ window.baguetteBox = (function () {
|
||||||
tt.show.call(this);
|
tt.show.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setVspeed() {
|
||||||
|
var v = vid();
|
||||||
|
ebi('bbox-vspeed').style.display = v ? '' : 'none';
|
||||||
|
if (!v)
|
||||||
|
return;
|
||||||
|
|
||||||
|
v.playbackRate = vspeed;
|
||||||
|
btnSpeed.textContent = vspeed + "x";
|
||||||
|
swrite('vspeed', vspeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cycleVspeed() {
|
||||||
|
var newSpeed = vspeed + 0.25;
|
||||||
|
if (newSpeed > 2.0) {
|
||||||
|
newSpeed = 0.25;
|
||||||
|
}
|
||||||
|
vspeed = newSpeed;
|
||||||
|
|
||||||
|
setVspeed();
|
||||||
|
if (tt.en)
|
||||||
|
tt.show.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
function findfile() {
|
function findfile() {
|
||||||
var thumb = currentGallery[currentIndex].imageElement,
|
var thumb = currentGallery[currentIndex].imageElement,
|
||||||
name = vsplit(thumb.href)[1].split('?')[0],
|
name = vsplit(thumb.href)[1].split('?')[0],
|
||||||
|
|
@ -627,6 +653,7 @@ window.baguetteBox = (function () {
|
||||||
bind(overlay, 'wheel', overlayWheelHandler);
|
bind(overlay, 'wheel', overlayWheelHandler);
|
||||||
bind(btnPrev, 'click', showLeftImage);
|
bind(btnPrev, 'click', showLeftImage);
|
||||||
bind(btnNext, 'click', showRightImage);
|
bind(btnNext, 'click', showRightImage);
|
||||||
|
bind(btnSpeed, 'click', cycleVspeed);
|
||||||
bind(btnClose, 'click', hideOverlay);
|
bind(btnClose, 'click', hideOverlay);
|
||||||
bind(btnVmode, 'click', tglVmode);
|
bind(btnVmode, 'click', tglVmode);
|
||||||
bind(btnHelp, 'click', halp);
|
bind(btnHelp, 'click', halp);
|
||||||
|
|
@ -651,6 +678,7 @@ window.baguetteBox = (function () {
|
||||||
unbind(overlay, 'wheel', overlayWheelHandler);
|
unbind(overlay, 'wheel', overlayWheelHandler);
|
||||||
unbind(btnPrev, 'click', showLeftImage);
|
unbind(btnPrev, 'click', showLeftImage);
|
||||||
unbind(btnNext, 'click', showRightImage);
|
unbind(btnNext, 'click', showRightImage);
|
||||||
|
unbind(btnSpeed, 'click', cycleVspeed);
|
||||||
unbind(btnClose, 'click', hideOverlay);
|
unbind(btnClose, 'click', hideOverlay);
|
||||||
unbind(btnVmode, 'click', tglVmode);
|
unbind(btnVmode, 'click', tglVmode);
|
||||||
unbind(btnHelp, 'click', halp);
|
unbind(btnHelp, 'click', halp);
|
||||||
|
|
@ -1281,6 +1309,7 @@ window.baguetteBox = (function () {
|
||||||
selbg();
|
selbg();
|
||||||
mp_ctl();
|
mp_ctl();
|
||||||
setVmode();
|
setVmode();
|
||||||
|
setVspeed();
|
||||||
|
|
||||||
var el = vidimg();
|
var el = vidimg();
|
||||||
if (el.getAttribute('rot'))
|
if (el.getAttribute('rot'))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue