mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #2941 from jellyfin/slideshow-play
Slideshow autoplay
This commit is contained in:
commit
059168a496
3 changed files with 13 additions and 4 deletions
|
@ -172,6 +172,8 @@ export default function (options) {
|
|||
|
||||
html += '<div class="topActionButtons">';
|
||||
if (actionButtonsOnTop) {
|
||||
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true);
|
||||
|
||||
if (appHost.supports('filedownload') && options.user && options.user.Policy.EnableContentDownloading) {
|
||||
html += getIcon('file_download', 'btnDownload slideshowButton', true);
|
||||
}
|
||||
|
@ -347,7 +349,7 @@ export default function (options) {
|
|||
minRatio: 1,
|
||||
toggle: true
|
||||
},
|
||||
autoplay: !options.interactive,
|
||||
autoplay: !options.interactive || !!options.autoplay,
|
||||
keyboard: {
|
||||
enabled: true
|
||||
},
|
||||
|
@ -376,6 +378,8 @@ export default function (options) {
|
|||
if (useFakeZoomImage) {
|
||||
swiperInstance.on('zoomChange', onZoomChange);
|
||||
}
|
||||
|
||||
if (swiperInstance.autoplay?.running) onAutoplayStart();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -666,12 +666,14 @@ class ItemsView {
|
|||
|
||||
if (currentItem && !self.hasFilters) {
|
||||
playbackManager.play({
|
||||
items: [currentItem]
|
||||
items: [currentItem],
|
||||
autoplay: true
|
||||
});
|
||||
} else {
|
||||
getItems(self, self.params, currentItem, null, null, 300).then(function (result) {
|
||||
playbackManager.play({
|
||||
items: result.Items
|
||||
items: result.Items,
|
||||
autoplay: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -701,7 +703,8 @@ class ItemsView {
|
|||
} else {
|
||||
getItems(self, self.params, currentItem, 'Random', null, 300).then(function (result) {
|
||||
playbackManager.play({
|
||||
items: result.Items
|
||||
items: result.Items,
|
||||
autoplay: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ export default class PhotoPlayer {
|
|||
startIndex: index,
|
||||
interval: 11000,
|
||||
interactive: true,
|
||||
// playbackManager.shuffle has no options. So treat 'shuffle' as a 'play' action
|
||||
autoplay: options.autoplay || options.shuffle,
|
||||
user: result
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue