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

Move plugins to a dedicated directory

This commit is contained in:
MrTimscampi 2020-05-18 17:57:52 +02:00
parent e5a13a2020
commit 128baad126
14 changed files with 11 additions and 11 deletions

View file

@ -0,0 +1,45 @@
import connectionManager from 'connectionManager';
export default class PhotoPlayer {
constructor() {
this.name = 'Photo Player';
this.type = 'mediaplayer';
this.id = 'photoplayer';
this.priority = 1;
}
play(options) {
return new Promise(function (resolve, reject) {
import('slideshow').then(({default: slideshow}) => {
var index = options.startIndex || 0;
var apiClient = connectionManager.currentApiClient();
apiClient.getCurrentUser().then(function(result) {
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
items: options.items,
startIndex: index,
interval: 11000,
interactive: true,
user: result
});
newSlideShow.show();
resolve();
});
});
});
}
canPlayMediaType(mediaType) {
return (mediaType || '').toLowerCase() === 'photo';
}
}