mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
commit
ee506b82c3
1 changed files with 21 additions and 12 deletions
|
@ -198,6 +198,20 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onAutoplayStart() {
|
||||||
|
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
|
||||||
|
if (btnSlideshowPause) {
|
||||||
|
btnSlideshowPause.innerHTML = "pause";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onAutoplayStop() {
|
||||||
|
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
|
||||||
|
if (btnSlideshowPause) {
|
||||||
|
btnSlideshowPause.innerHTML = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function loadSwiper(dlg) {
|
function loadSwiper(dlg) {
|
||||||
|
|
||||||
if (currentOptions.slides) {
|
if (currentOptions.slides) {
|
||||||
|
@ -225,6 +239,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
speed: 240
|
speed: 240
|
||||||
});
|
});
|
||||||
|
|
||||||
|
swiperInstance.on('autoplayStart', onAutoplayStart);
|
||||||
|
swiperInstance.on('autoplayStop', onAutoplayStop);
|
||||||
|
|
||||||
if (layoutManager.mobile) {
|
if (layoutManager.mobile) {
|
||||||
pause();
|
pause();
|
||||||
} else {
|
} else {
|
||||||
|
@ -336,23 +353,15 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
|
|
||||||
function play() {
|
function play() {
|
||||||
|
if (swiperInstance.autoplay) {
|
||||||
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
|
swiperInstance.autoplay.start();
|
||||||
if (btnSlideshowPause) {
|
|
||||||
btnSlideshowPause.innerHTML = "pause";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swiperInstance.startAutoplay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pause() {
|
function pause() {
|
||||||
|
if (swiperInstance.autoplay) {
|
||||||
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
|
swiperInstance.autoplay.stop();
|
||||||
if (btnSlideshowPause) {
|
|
||||||
btnSlideshowPause.innerHTML = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swiperInstance.stopAutoplay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function playPause() {
|
function playPause() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue