define(["browser","require","events","apphost","loading","dom","playbackManager","appRouter","appSettings","connectionManager"],function(browser,require,events,appHost,loading,dom,playbackManager,appRouter,appSettings,connectionManager){"use strict";function PhotoPlayer(){this.name="Photo Player",this.type="mediaplayer",this.id="photoplayer",this.priority=1}return PhotoPlayer.prototype.play=function(options){var self=this;return new Promise(function(resolve,reject){require(["slideshow"],function(slideshow){var index=options.startIndex||0,newSlideShow=new slideshow({showTitle:!1,cover:!1,items:options.items,startIndex:index,interval:11e3,interactive:!0});newSlideShow.show(),events.on(newSlideShow,"closed",self.onSlideShowClosed.bind(self)),self.slideshow=newSlideShow,resolve()})})},PhotoPlayer.prototype.onSlideShowClosed=function(){events.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(){return 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()},PhotoPlayer});