define(["exports","./../emby-apiclient/events.js","./../layoutmanager.js"],function(_exports,_events,_layoutmanager){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 new Promise(function(resolve,reject){require(["slideshow"],function(slideshow){var index=options.startIndex||0,index=new slideshow({cardFields:[],cover:!1,getItems:options.getItems,items:options.items,startIndex:index,interval:11e3,interactive:!0,autoplay:_layoutmanager.default.tv||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,resolve()})})},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||"").toLowerCase()},_exports.default=PhotoPlayer});