define(["exports","./../emby-apiclient/events.js","./../common/appsettings.js"],function(_exports,_events,_appsettings){function PhotoPlayer(){this.name="Photo Player",this.type="mediaplayer",this.id="photoplayer",this.priority=1}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,PhotoPlayer.prototype.play=function(options){var self=this;return Emby.importModule("./modules/slideshow/slideshow.js").then(function(slideshow){var index=options.startIndex||0,index=new slideshow({cardFields:[],cover:!1,getItems:options.getItems,items:options.items,startIndex:index,interval:_appsettings.default.slideshowIntervalMs(),interactive:!0,autoplay:options.autoplay,serverId:options.serverId||(null==(slideshow=options.items[0])?void 0:slideshow.ServerId)});index.show(),_events.default.on(index,"closed",self.onSlideShowClosed.bind(self)),self.slideshow=index})},PhotoPlayer.prototype.onSlideShowClosed=function(){_events.default.trigger(this,"stopped")},PhotoPlayer.prototype.stop=function(options){return this.slideshow?(this.slideshow.hide(),this.slideshow=null,new Promise(function(resolve,reject){setTimeout(resolve,500)})):Promise.resolve()},PhotoPlayer.prototype.destroy=function(options){this.stop()},PhotoPlayer.prototype.isPlaying=function(mediaType){return(!mediaType||"Photo"===mediaType)&&null!=this.slideshow},PhotoPlayer.prototype.pause=function(){},PhotoPlayer.prototype.unpause=function(){},PhotoPlayer.prototype.paused=function(){return!1},PhotoPlayer.prototype.getVolume=function(){return 100},PhotoPlayer.prototype.setVolume=function(){},PhotoPlayer.prototype.volumeUp=function(){},PhotoPlayer.prototype.volumeDown=function(){},PhotoPlayer.prototype.setMute=function(mute){},PhotoPlayer.prototype.currentTime=function(){},PhotoPlayer.prototype.duration=function(){},PhotoPlayer.prototype.isMuted=function(){return!1},PhotoPlayer.prototype.canPlayMediaType=function(mediaType){return"Photo"===mediaType};_exports.default=PhotoPlayer});