1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

use shared slideshow

This commit is contained in:
Luke Pulverenti 2016-01-31 01:03:40 -05:00
parent ce8bc1a2f6
commit 619d81ee23
86 changed files with 18787 additions and 2233 deletions

View file

@ -125,26 +125,6 @@
function showSlideshow(page, items, startItemId) {
var screenWidth = $(window).width();
var screenHeight = $(window).height();
var slideshowItems = items.map(function (item) {
var imgUrl = ApiClient.getScaledImageUrl(item.Id, {
tag: item.ImageTags.Primary,
type: 'Primary',
maxWidth: screenWidth,
maxHeight: screenHeight
});
return {
title: item.Name,
href: imgUrl
};
});
var index = items.map(function (i) {
return i.Id;
@ -154,12 +134,18 @@
index = 0;
}
require(['swipebox'], function () {
require(['slideshow'], function (slideshow) {
$.swipebox(slideshowItems, {
initialIndexOnArray: index,
hideBarsDelay: 30000
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
items: items,
startIndex: index,
interval: 7000,
interactive: true
});
newSlideShow.show();
});
}