xmp.PlaybackMode=function(aa,ba,ca){this.type=aa;this.name=ba;this.transitionTable=ca;};xmp.PlaybackMode.prototype.getName=function(){return this.name;};xmp.PlaybackMode.prototype.changeMode=function(da,ea,fa,ga){this.validateModeChange(da,ea,fa);da._changeState(ea,ga);};xmp.PlaybackMode.prototype.invalidOperation=function(ha,ia){throw new xmp.PlaybackModeError("Validating state operation.","Invalid mode operation.  The \""+this.name+"\" mode does not change or transition to a mode that supports the \""+ia.toLowerCase()+"\" operation.",this);};xmp.PlaybackMode.prototype.validateModeChange=function(ja,ka,la){if(false===this.isAvailable(ja,ka)){this.invalidOperation(ja,la);}};xmp.PlaybackMode.prototype.canTransition=function(ma){if(this.transitionTable===null){return false;}
for(var i=0;i<this.transitionTable.length;i++){if(this.transitionTable[i]===ma){return true;}}
return false;};xmp.PlaybackMode.prototype.getPlayer=function(na){return na._getPlayer();};xmp.PlaybackMode.prototype.open=function(oa,pa){};xmp.PlaybackMode.prototype.close=function(qa){};xmp.PlaybackMode.prototype.play=function(ra){};xmp.PlaybackMode.prototype.pause=function(sa){};xmp.PlaybackMode.prototype.stop=function(ta){};xmp.PlaybackMode.prototype.rewind=function(ua){};xmp.PlaybackMode.prototype.fastForward=function(va){};xmp.PlaybackMode.prototype.seek=function(wa,xa){};xmp.PlaybackMode.prototype.ended=function(ya){};xmp.PlaybackMode.prototype.error=function(za){};xmp.PlaybackMode.prototype.transition=function(Aa,Ba,Ca){};xmp.PlaybackMode.prototype.isAvailable=function(Da,Ea){try{return(true===this.canTransition(Ea)||this.getPlayer(Da).isAvailable(Ea));}
catch(e){this.handleError(Da,xmp.IS_AVAILABLE,e);}
return false;};xmp.PlaybackMode.prototype.getPosition=function(Fa){try{return parseInt(this.getPlayer(Fa).getPosition(),10);}
catch(e){this.handleError(Fa,xmp.GET_POSITION,e);}
return 0;};xmp.PlaybackMode.prototype.getDuration=function(Ga){try{return parseInt(this.getPlayer(Ga).getDuration(),10);}
catch(e){this.handleError(Ga,xmp.GET_DURATION,e);}
return 0;};xmp.PlaybackMode.prototype.getVolume=function(Ha){try{return this.getPlayer(Ha).getVolume();}
catch(e){this.handleError(Ha,xmp.GET_VOLUME,e);}
return 0;};xmp.PlaybackMode.prototype.setVolume=function(Ia,Ja){try{this.getPlayer(Ia).setVolume(Ja);}
catch(e){this.handleError(Ia,xmp.SET_VOLUME,e);}};xmp.PlaybackMode.prototype.getMute=function(Ka){try{return this.getPlayer(Ka).getMute();}
catch(e){this.handleError(Ka,xmp.GET_MUTE,e);}
return false;};xmp.PlaybackMode.prototype.setMute=function(La,Ma){try{this.getPlayer(La).setMute(Ma);}
catch(e){this.handleError(La,xmp.SET_MUTE,e);}};xmp.PlaybackMode.prototype.getFullscreen=function(Na){try{return this.getPlayer(Na).getFullscreen();}
catch(e){this.handleError(Na,xmp.GET_FULLSCREEN,e);}
return false;};xmp.PlaybackMode.prototype.setFullscreen=function(Oa,Pa){try{this.getPlayer(Oa).setFullscreen(Pa);}
catch(e){this.handleError(Oa,xmp.SET_FULLSCREEN,e);}};xmp.PlaybackMode.prototype.getBufferingProgress=function(Qa){try{return this.getPlayer(Qa).getBufferingProgress();}
catch(e){this.handleError(Qa,xmp.GET_BUFFERING_PROGRESS,e);}
return null;};xmp.PlaybackMode.prototype.handleError=function(Ra,Sa,e){var Ta=e;if(false===(Ta instanceof xmp.NativePlayerError)){var Ua="Delegating \""+Sa.toLowerCase()+"\" operation to native player.";Ta=new xmp.NativePlayerError(((e.context)?e.context:Ua),((e.rawMessage)?e.rawMessage:e.message),this.getPlayer(Ra),[{label:"Playback Mode",text:this.getName()}]);Ta.setInnerError(e);}
throw Ta;};xmp.PlugInError=function(Va,Wa,Xa,Ya){xmp.PlugInError.ctor.call(this,xmp.XmpErrorCodes.FATAL_PLUGIN,Va,Wa,Xa);this.plugIn=Ya;};xmp.DERIVE_CLASS(xmp.FatalException,xmp.PlugInError);xmp.MediaPlayer=function(Za,$a){this.name=Za;this.defaultEventListener=$a;this._logger=new xmp.util.internals.CategoryLogger('MediaPlayer');this._MEDIA_PLAYER_CONFIGURATION_PATH="/PlayerContexts/Global/Media Player";};xmp.MediaPlayer.prototype.name=null;xmp.MediaPlayer.prototype.defaultEventListener=null;xmp.MediaPlayer.prototype.init=function(){try{this.registry=new xmp.PlayerModeRegistry();this.state=this.registry.findMode(xmp.IDLE);this.player=xmp.NativePlayerRegistry.getNullPlayer();this.viewManager=new xmp.ViewManager(this.name);this.setViewportConfig(xmp.NULL_MIME_TYPE,xmp.DHTML_VIEWPORT);this.bandwidthRecorder=new xmp.BandwidthRecorder(this,this._MEDIA_PLAYER_CONFIGURATION_PATH);this.listeners=[];this.mute=false;this.volume=0;this.fullscreen=false;this._addListener(this.defaultEventListener);if(!this.name||this.name.length===0){throw new xmp.MediaPlayerError("Validating media player name.","Invalid media player name.  Missing name.");}
if(this.name.indexOf(" ")!==-1){throw new xmp.MediaPlayerError("Validating media player name.","Invalid media player name.  Name cannot contain spaces.");}
xmp.NativePlayerRegistry.createGroup(this.name,this);this.listeners[0].onInitialized();}
catch(e){this._handleMethodError("Initializing.",e);}};xmp.MediaPlayer.prototype.fini=function(){try{this.close();this.viewManager.close();xmp.NativePlayerRegistry.destoryGroup(this.name);}
catch(e){this._handleMethodError("Fini.",e);}};xmp.MediaPlayer.prototype.setViewportConfig=function(ab,bb){try{xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.STRING_TYPE],"MediaPlayer.setViewportConfig");if(false===xmp.NativePlayerRegistry.canAccept(this.name,ab)){throw new xmp.InvalidMimeTypeError("Setting viewport configuration.","Invalid media player viewport MIME type \""+ab+"\".");}
this.viewManager.setViewportConfig(ab,bb);}
catch(e){this._handleMethodError("Setting viewport configuration.",e);}};xmp.MediaPlayer.prototype.getViewport=function(){try{return new xmp.ViewportProxy(this.viewManager);}
catch(e){this._handleMethodError("Retrieving viewport.",e);}
return null;};xmp.MediaPlayer.prototype.open=function(cb){try{xmp.validateArguments(arguments,[xmp.OBJECT_TYPE],"MediaPlayer.open");if(false===xmp.PlayerPolicy.apply(this,cb)){return;}
this._validateNode(cb);this.node=cb;if(false===this._initNativePlayer(cb)){this.state.open(this,cb);}}
catch(e){this._handleMethodError("Opening.",e);}};xmp.MediaPlayer.prototype.close=function(){try{this._close();this.viewManager.close();this._setNullPlayer();}
catch(e){this._handleMethodError("Closing.",e);}};xmp.MediaPlayer.prototype.play=function(){try{this.state.play(this);}
catch(e){this._handleMethodError("Playing.",e);}};xmp.MediaPlayer.prototype.pause=function(){try{this.state.pause(this);}
catch(e){this._handleMethodError("Pausing.",e);}};xmp.MediaPlayer.prototype.stop=function(){try{this.state.stop(this);}
catch(e){this._handleMethodError("Stopping.",e);}};xmp.MediaPlayer.prototype.rewind=function(){try{this.state.rewind(this);}
catch(e){this._handleMethodError("Rewinding.",e);}};xmp.MediaPlayer.prototype.fastForward=function(){try{this.state.fastForward(this);}
catch(e){this._handleMethodError("Fast forwarding.",e);}};xmp.MediaPlayer.prototype.seek=function(db){try{xmp.validateArguments(arguments,[xmp.NUMBER_TYPE],"MediaPlayer.seek");this._validatePosition(db);this.state.seek(this,db);}
catch(e){this._handleMethodError("Seeking.",e);}};xmp.MediaPlayer.prototype.isAvailable=function(eb){try{xmp.validateArguments(arguments,[xmp.STRING_TYPE],"MediaPlayer.isAvailable");return this.state.isAvailable(this,eb);}
catch(e){this._handleMethodError("Checking information or action available.",e);}
return false;};xmp.MediaPlayer.prototype.getPosition=function(){try{return this.state.getPosition(this);}
catch(e){this._handleMethodError("Retrieving position.",e);}
return 0;};xmp.MediaPlayer.prototype.getDuration=function(){try{return this.state.getDuration(this);}
catch(e){this._handleMethodError("Retrieving duration.",e);}
return 0;};xmp.MediaPlayer.prototype.setVolume=function(fb){try{xmp.validateArguments(arguments,[xmp.NUMBER_TYPE],"MediaPlayer.setVolume");this._validateVolume(fb);this.state.setVolume(this,fb);this.volume=this.state.getVolume(this);}
catch(e){this._handleMethodError("Setting volume.",e);}};xmp.MediaPlayer.prototype.getVolume=function(){try{return this.state.getVolume(this);}
catch(e){this._handleMethodError("Retrieving volume.",e);}
return 0;};xmp.MediaPlayer.prototype.setMute=function(gb){try{xmp.validateArguments(arguments,[xmp.BOOLEAN_TYPE],"MediaPlayer.setMute");this.state.setMute(this,gb);this.mute=this.state.getMute(this);}
catch(e){this._handleMethodError("Setting mute.",e);}};xmp.MediaPlayer.prototype.getMute=function(){try{return this.state.getMute(this);}
catch(e){this._handleMethodError("Retrieving mute.",e);}
return false;};xmp.MediaPlayer.prototype.setFullscreen=function(hb){try{xmp.validateArguments(arguments,[xmp.BOOLEAN_TYPE],"MediaPlayer.setFullscreen");this.state.setFullscreen(this,hb);this.fullscreen=this.state.getFullscreen(this);}
catch(e){this._handleMethodError("Setting fullscreen.",e);}};xmp.MediaPlayer.prototype.getFullscreen=function(){try{return this.state.getFullscreen(this);}
catch(e){this._handleMethodError("Retrieving fullscreen.",e);}
return false;};xmp.MediaPlayer.prototype.getBufferingProgress=function(){try{return this.state.getBufferingProgress(this);}
catch(e){this._handleMethodError("Retrieving buffering progress.",e);}
return null;};xmp.MediaPlayer.prototype.addEventListener=function(ib){try{xmp.validateArguments(arguments,[xmp.OBJECT_TYPE],"MediaPlayer.addEventListener");this._addListener(ib);}
catch(e){this._handleMethodError("Adding event listener.",e);}};xmp.MediaPlayer.prototype._initNativePlayer=function(jb){try{this._close();var kb=jb.getMimeType();var lb=xmp.NativePlayerRegistry.findPlayerByMIMEType(this.name,kb);if(!lb){throw new xmp.InvalidMimeTypeError("Initializing native player.","Unable to find native player for MIME type \""+kb+"\".");}
if(kb===xmp.MOCK_MIME_TYPE){this.player=lb;return false;}
var mb={player:lb,data:{group:this.name,viewport:null,volume:this.volume,mute:this.mute,fullscreen:this.fullscreen,node:jb}};if(false===this.viewManager.openViewport(this,this.name,jb.getMimeType(),mb)){if(lb.type!==this.player.type){lb.create({group:this.name,viewport:this.viewManager.getActiveViewport(),volume:this.volume,mute:this.mute,fullscreen:this.fullscreen,node:jb});this.player=lb;return true;}
return false;}
return true;}
catch(e){this._setNullPlayer();throw e;}
return false;};xmp.MediaPlayer.prototype.onNativePlayerStateChange=function(nb,ob){try{if(nb===xmp.OPEN){if(this.state.type===xmp.ERRORS||this.state.type===xmp.IDLE){this._logger.debug("Ignoring native player \""+xmp.OPEN+"\" state change.  Media player is in an idle (closed) or error state.");return;}
this._notifyStateChange(nb,ob);this._notifyTimelineChange(this.state.getPosition(this),this.state.getDuration(this));this.state.play(this);return;}
else{if(nb===xmp.ENDED){this._notifyTimelineChange(this.state.getPosition(this),this.state.getDuration(this));this.state.ended(this);}
else if(nb===xmp.CONNECTING){this.bandwidthRecorder.start();}}
this._notifyStateChange(nb,ob);}
catch(e){this._handleError(e);}};xmp.MediaPlayer.prototype.onNativePlayerTrigger=function(pb,qb){};xmp.MediaPlayer.prototype.onNativePlayerError=function(e){this._handleError(e);};xmp.MediaPlayer.prototype.onNativePlayerTimelineChange=function(rb,sb){this._notifyTimelineChange(rb,sb);this._checkTimeLimit(rb,sb);};xmp.MediaPlayer.prototype.onNativePlayerCreated=function(tb,ub){if(this.state.type===xmp.ERRORS){return;}
this._logger.debug("Created \""+tb.getType()+"\" native player.");this.state.open(this,ub.node);};xmp.MediaPlayer.prototype.onNativePlayerExecuteCommand=function(vb,wb){var xb=null;if(vb===xmp.PLAY){this.play();}
else if(vb===xmp.PAUSE){this.pause();}
else if(vb===xmp.STOP){this.stop();}
else if(vb===xmp.REWIND){this.rewind();}
else if(vb===xmp.FAST_FORWARD){this.fastForward();}
else if(vb===xmp.SEEKABLE){this.seek(parseInt(wb,10));}
else if(vb===xmp.IS_AVAILABLE){xb=this.isAvailable(wb);}
else if(vb===xmp.GET_POSITION){xb=this.getPosition();}
else if(vb===xmp.GET_DURATION){xb=this.getDuration();}
else if(vb===xmp.GET_VOLUME){xb=this.getVolume();}
else if(vb===xmp.SET_VOLUME){this.setVolume(parseInt(wb,10));}
else if(vb===xmp.GET_MUTE){xb=this.getMute();}
else if(vb===xmp.SET_MUTE){this.setMute(xmp.TRUE===wb);}
return xb;};xmp.MediaPlayer.prototype.onViewportOpened=function(yb,zb){zb.data.viewport=yb;zb.player.create(zb.data);this.player=zb.player;};xmp.MediaPlayer.prototype.onCreateViewport=function(Ab,Bb,Cb,Db){return this.listeners[0].onCreateViewport(Ab,Bb,Cb,Db);};xmp.MediaPlayer.prototype.onDestroyViewport=function(Eb,Fb){this.listeners[0].onDestroyViewport(Eb,Fb);};xmp.MediaPlayer.prototype.onViewportCreated=function(Gb,Hb){if(this.state.type===xmp.ERRORS){return;}
if(Hb===null){return;}
this._logger.debug("Created \""+Gb.getType()+"\" viewport.");this.viewManager.openViewport(this,this.name,Gb.mime_type,Hb);};xmp.MediaPlayer.prototype.onViewportError=function(e){this._handleError(e);};xmp.MediaPlayer.prototype._handleMethodError=function(Ib,e){var Jb=e;if(false===(Jb instanceof xmp.MediaPlayerError)){Jb=new xmp.MediaPlayerError(((e.context)?e.context:Ib),((e.rawMessage)?e.rawMessage:e.message));Jb.setInnerError(e);}
this._handleError(Jb);};xmp.MediaPlayer.prototype._handleError=function(e){try{var Kb=((this.node)?this.node.getURI():"");if(Kb&&Kb.length>0){e.addExtendedInfo({label:"Url",text:Kb});}
var Lb="\n\n"+e.message;((true===(e instanceof xmp.NativePlayerConnectionError))?this._logger.fatal(Lb,e):this._logger.warn(Lb));if(!this.listeners||this.listeners.length===0){xmp.handleFatalError(e);}
else{this.viewManager.hideOverlays(xmp.ALL_OVERLAYS);this._error();for(var i=0;i<this.listeners.length;i++){this.listeners[i].onError(this.node,e);}}}
catch(e){}};xmp.MediaPlayer.prototype._validateNode=function(Mb){if(Mb===null){throw new xmp.InvalidPlayableNodeError("Validating playable node.","Invalid playable node.  Missing node.");}
var Nb=Mb.getMimeType();if(!Nb||Nb.length===0){throw new xmp.InvalidPlayableNodeError("Validating playable node mime type.","Invalid playable node.  Missing MIME type.");}
var Ob=Mb.getURI();if(!Ob||Ob.length===0){throw new xmp.InvalidPlayableNodeError("Validating playable node URI.","Invalid playable node.  Missing URI.");}
this._validateTimeLimit(Mb);var Pb=Mb.getEndedFrame();if(!Pb||Pb.length===0){throw new xmp.InvalidPlayableNodeError("Validating playable node ended frame.","Invalid playable node ended frame.  Missing ended frame.");}
if(Pb!==xmp.FIRST_FRAME&&Pb!==xmp.LAST_FRAME){throw new xmp.InvalidPlayableNodeError("Validating playable node ended frame type.","Invalid playable node ended frame \""+Pb+"\".  Expected \"First\" or \"Last\" frame.");}};xmp.MediaPlayer.prototype._setNullPlayer=function(){try{var Qb=xmp.NativePlayerRegistry.getNullPlayer();if(this.viewManager.getActiveViewport()===null){this.viewManager.createViewport(this,this.name,xmp.NULL_MIME_TYPE,null);}
Qb.create({group:this.name,viewport:this.viewManager.getActiveViewport(),volume:0,mute:false,fullscreen:false,node:null});this.player=Qb;}
catch(e){}};xmp.MediaPlayer.prototype._validateVolume=function(Rb){if(Rb<0||Rb>100){throw new xmp.util.internals.InvalidArgsError("Invalid volume \""+Rb+"\".  Valid values are 1 to 100.");}};xmp.MediaPlayer.prototype._validatePosition=function(Sb){var Tb=this.getDuration();if(Sb<0||Sb>Tb){throw new xmp.util.internals.InvalidArgsError("Invalid position \""+Sb+"\".  Valid values are 0 to "+Tb+" seconds.");}};xmp.MediaPlayer.prototype._addListener=function(Ub){this._validateListener(Ub);this.listeners.push(Ub);};xmp.MediaPlayer.prototype._validateListener=function(Vb){if(!Vb){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  NULL listener.");}
if(false===xmp.isDefined(Vb.onInitialized)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onInitialized\" handler.");}
if(false===xmp.isDefined(Vb.onError)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onError\" handler.");}
if(false===xmp.isDefined(Vb.onStateChange)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onStateChange\" handler.");}
if(false===xmp.isDefined(Vb.onTimelineChange)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onTimelineChange\" handler.");}
if(false===xmp.isDefined(Vb.onCreateViewport)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onCreateViewport\" handler.");}
if(false===xmp.isDefined(Vb.onDestroyViewport)){throw new xmp.MediaPlayerError("Validating listener.","Invalid media player event listener.  Missing \"onDestroyViewport\" handler.");}
if(false===xmp.isDefined(Vb.onPlugInError)){throw new xmp.MediaPlayerError("Invalid media player event listener.  Missing \"onPlugInError\" handler.");}
if(false===xmp.isDefined(Vb.onUnsupportedPlatformError)){throw new xmp.MediaPlayerError("Invalid media player event listener.  Missing \"onUnsupportedPlatformError\" handler.");}};xmp.MediaPlayer.prototype._checkTimeLimit=function(Wb,Xb){this._validateTimeLimit(this.node);var Yb=this.node.getTimeLimitInSeconds();if(Yb!==xmp.NO_TIME_LIMIT&&Wb>=Yb){this.state.ended(this);this._notifyStateChange(xmp.ENDED,null);}};xmp.MediaPlayer.prototype._notifyTimelineChange=function(Zb,$b){for(var i=0;i<this.listeners.length;i++){this.listeners[i].onTimelineChange(this.node,Zb,$b);}};xmp.MediaPlayer.prototype._notifyStateChange=function(ac,bc){for(var i=0;i<this.listeners.length;i++){this.listeners[i].onStateChange(this.node,ac,bc);}};xmp.MediaPlayer.prototype.onError=function(cc,e){this.node=cc;this._handleError(e);};xmp.MediaPlayer.prototype.onPlugInError=function(e){this.viewManager.hideOverlays(xmp.ALL_OVERLAYS);this._error();this.listeners[0].onPlugInError(e);};xmp.MediaPlayer.prototype.onUnsupportedPlatformError=function(e){this.viewManager.hideOverlays(xmp.ALL_OVERLAYS);this._error();this.listeners[0].onUnsupportedPlatformError(e);};xmp.MediaPlayer.prototype._changeState=function(dc,ec){var fc=this.registry.findMode(dc);this._transitionState(fc,ec);this._logger.debug("Changed/transitioned to \""+fc.getName()+"\" mode.");this.state=fc;};xmp.MediaPlayer.prototype._transitionState=function(gc,hc){return gc.transition(this,hc,this.state);};xmp.MediaPlayer.prototype._getPlayer=function(){return this.player;};xmp.MediaPlayer.prototype._validateTimeLimit=function(ic){var jc=ic.getTimeLimitInSeconds();if(false===xmp.isDefined(jc)){throw new xmp.InvalidPlayableNodeError("Invalid playable node.  Missing time limit.");}
if(jc!==xmp.NO_TIME_LIMIT&&jc<=0){throw new xmp.InvalidPlayableNodeError("Invalid playable node.  Invalid time limit \""+jc+"\". Expected values are "+xmp.NO_TIME_LIMIT+" and greater than 1 seconds.");}};xmp.MediaPlayer.prototype.getName=function(){return this.name;};xmp.MediaPlayer.prototype._error=function(){this.bandwidthRecorder.stop();this.state.error(this);this._setNullPlayer();};xmp.MediaPlayer.prototype._close=function(){this.bandwidthRecorder.stop();this.state.close(this);};xmp.MediaPlayerFactory=new function(){this.createPlayer=function(kc,lc){return new xmp.MediaPlayer(kc,lc);};};xmp.NATIVE_PLAYER_Z_INDEX=1;xmp.VERSION_DELIMITER=".";xmp.MOVETO_OPERATION="moveTo";xmp.AbstractNativePlayer=function(mc,nc){this.type=mc;this.listener=nc;this.data=null;this.volume=0;this.mute=false;this.bufferingProgress={percent:0,bytesDownloaded:0,bytesTotal:0};this.fullscreen=false;this.plugInValidated=false;this.monitorTimer=null;};xmp.AbstractNativePlayer.prototype.open=function(oc){};xmp.AbstractNativePlayer.prototype.close=function(){this.stopMonitor();this.bufferingProgress={percent:0,bytesDownloaded:0,bytesTotal:0};};xmp.AbstractNativePlayer.prototype.fini=function(){try{if(this.data===null){return;}
this.close();var pc=this.getNative();var qc=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?pc.parentElement:pc.parentNode);qc.removeChild(pc);}
catch(e){}};xmp.AbstractNativePlayer.prototype.play=function(){this.startMonitor();};xmp.AbstractNativePlayer.prototype.pause=function(){this.stopMonitor();};xmp.AbstractNativePlayer.prototype.stop=function(){this.stopMonitor();};xmp.AbstractNativePlayer.prototype.rewind=function(){this.startMonitor();};xmp.AbstractNativePlayer.prototype.fastForward=function(){this.startMonitor();};xmp.AbstractNativePlayer.prototype.seek=function(rc){this.startMonitor();};xmp.AbstractNativePlayer.prototype.ended=function(){this.stopMonitor();};xmp.AbstractNativePlayer.prototype.error=function(){this.close();};xmp.AbstractNativePlayer.prototype.isAvailable=function(sc){return false;};xmp.AbstractNativePlayer.prototype.canAccept=function(tc){return false;};xmp.AbstractNativePlayer.prototype.getPosition=function(){return 0;};xmp.AbstractNativePlayer.prototype.getDuration=function(){return 0;};xmp.AbstractNativePlayer.prototype.getVolume=function(){return this.volume;};xmp.AbstractNativePlayer.prototype.setVolume=function(uc){this.volume=uc;};xmp.AbstractNativePlayer.prototype.getMute=function(){return this.mute;};xmp.AbstractNativePlayer.prototype.setMute=function(vc){this.mute=vc;};xmp.AbstractNativePlayer.prototype.getFullscreen=function(){return this.fullscreen;};xmp.AbstractNativePlayer.prototype.setFullscreen=function(wc){this.fullscreen=wc;};xmp.AbstractNativePlayer.prototype.getBufferingProgress=function(){return this.bufferingProgress;};xmp.AbstractNativePlayer.prototype.moveTo=function(xc,yc,zc,Ac){var Bc=((this.getNative().style.zIndex)?"z-Index: "+this.getNative().style.zIndex+";":"")+"left: "+xmp.getPixelUnits(xc)+"; top: "+xmp.getPixelUnits(yc)+"; width: "+xmp.getPixelUnits(zc)+"; height: "+xmp.getPixelUnits(Ac);this.getNative().style.cssText=Bc;};xmp.AbstractNativePlayer.prototype.validate=function(Cc,Dc){if(false===this.plugInValidated){this.onValidatePlugIn(Cc,Dc);this.plugInValidated=true;}};xmp.AbstractNativePlayer.prototype.onValidatePlugIn=function(Ec,Fc){};xmp.AbstractNativePlayer.prototype.setState=function(Gc,Hc){if(Gc===xmp.BUFFERING){this.bufferingProgress=Hc;}
this.createTimer({object:this,id:"setState",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetState,context:{type:Gc,data:Hc}}).start();};xmp.AbstractNativePlayer.prototype.setError=function(Ic,e){this.stopMonitor();var Jc=e;if(false===(Jc instanceof xmp.NativePlayerError)&&false===(Jc instanceof xmp.NativePlayerConnectionError)){Jc=new xmp.NativePlayerError(((e.context)?e.context:Ic),((e.rawMessage)?e.rawMessage:e.message),this);Jc.setInnerError(e);}
this.createTimer({object:this,id:"setError",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetError,context:Jc}).start();};xmp.AbstractNativePlayer.prototype.setTrigger=function(Kc,Lc){this.createTimer({object:this,id:"setTrigger",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetTrigger,context:{name:Kc,data:Lc}}).start();};xmp.AbstractNativePlayer.prototype.setCreated=function(){this.data.viewport.setNativePlayer(this);this.createTimer({object:this,id:"setCreated",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetCreated,context:null}).start();};xmp.AbstractNativePlayer.prototype.executeCommand=function(Mc,Nc){return this.listener.onNativePlayerExecuteCommand(Mc,Nc);};xmp.AbstractNativePlayer.prototype.create=function(Oc){this.data=Oc;};xmp.AbstractNativePlayer.prototype.attach=function(Pc){this.data=Pc;};xmp.AbstractNativePlayer.prototype.getNative=function(){var Qc=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?window[this.data.id]:document[this.data.id]);if(!Qc){Qc=document.getElementById(this.data.id);if(!Qc){throw new xmp.NativePlayerError("Retrieving native player.","Unable to retrieve \""+this.type+"\" native player.",this);}}
return Qc;};xmp.AbstractNativePlayer.prototype.getName=function(){return((this.data)?this.data.id:"");};xmp.AbstractNativePlayer.prototype.getType=function(){return this.type;};xmp.AbstractNativePlayer.prototype.getGroup=function(){return((this.data)?this.data.group:"");};xmp.AbstractNativePlayer.prototype.startMonitor=function(){if(!this.monitorTimer){this.monitorTimer=this.createTimer({object:this,id:"timelineChange",interval:xmp.MONITOR_INTERVAL,handler:this.onTimelineChange,context:null});this.monitorTimer.start();}};xmp.AbstractNativePlayer.prototype.stopMonitor=function(){if(this.monitorTimer){this.monitorTimer.stop();this.monitorTimer=null;}};xmp.AbstractNativePlayer.prototype.parseVersion=function(Rc){var Sc=Rc;var Tc=0;var Uc=-1;var Vc=-1;var Wc=-1;var Xc=Sc.indexOf(xmp.VERSION_DELIMITER);if(Xc!==-1){Tc=parseInt(Sc.substr(0,Xc),10);Sc=Sc.substr(Xc+1);Xc=Sc.indexOf(xmp.VERSION_DELIMITER);if(Xc!==-1){Uc=parseInt(Sc.substr(0,Xc),10);Sc=Sc.substr(Xc+1);Xc=Sc.indexOf(xmp.VERSION_DELIMITER);if(Xc!==-1){Vc=parseInt(Sc.substr(0,Xc),10);Sc=Sc.substr(Xc+1);if(Sc.length>0){Wc=parseInt(Sc,10);}}
else{Vc=parseInt(Sc,10);}}
else{Uc=parseInt(Sc,10);}}
else{Tc=parseInt(Sc,10);}
return{major:Tc,minor:Uc,revision:Vc,build:Wc};};xmp.AbstractNativePlayer.prototype.validatePlugInVersion=function(Yc,Zc,$c,ad){var bd=Zc+"PlugInVersion";xmp.util.PlayerStats.getInstance().setValue(bd,$c);var cd=this.parseVersion($c);var dd=this.getPlugInInfo(ad,Zc);var ed=this.parseVersion(dd.version);var fd=[{version:cd.major,expectedVersion:ed.major},{version:cd.minor,expectedVersion:ed.minor},{version:cd.revision,expectedVersion:ed.revision},{version:cd.build,expectedVersion:ed.build}];var gd=fd.length;for(var i=0;i<gd;i++){if(fd[i].version<fd[i].expectedVersion){throw new xmp.InvalidPlugInVersionError(Yc,dd,$c);}
if(fd[i].version!==fd[i].expectedVersion){break;}}};xmp.AbstractNativePlayer.prototype.getPlugInInfo=function(hd,jd){var kd=hd[jd];if(!kd){throw new xmp.NativePlayerError("Retrieving plugin info.","Unable to retrieve \""+jd+"\" plugin information.",this);}
return kd;};xmp.AbstractNativePlayer.prototype.createTimer=function(ld){var md=new xmp.util.Callback(ld.id,ld.handler,ld.object);md.setMetadata(xmp.CONTEXT,ld.context);return new xmp.util.Timer(ld.id,ld.interval,-1,md);};xmp.AbstractNativePlayer.prototype.onTimelineChange=function(nd,od){try{var pd=parseInt(this.getDuration(),10);var qd=((pd>0)?parseInt(this.getPosition(),10):0);this.listener.onNativePlayerTimelineChange(qd,pd);}
catch(e){this.setError("Forwarding timeline change to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetState=function(rd,sd){try{sd.stop();var td=rd.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerStateChange(td.type,td.data);}
catch(e){this.setError("Forwarding state change to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetError=function(ud,vd){var wd=null;try{vd.stop();wd=ud.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerError(wd);}
catch(e){var xd=((wd)?wd:e);xmp.handleFatalError(xd);}};xmp.AbstractNativePlayer.prototype.onSetTrigger=function(yd,zd){try{zd.stop();var Ad=yd.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerTrigger(Ad.name,Ad.data);}
catch(e){this.setError("Forwarding trigger to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetCreated=function(Bd,Cd){try{Cd.stop();this.listener.onNativePlayerCreated(this,this.data);}
catch(e){this.setError("Forwarding created to listener.",e);}};xmp.AbstractNativePlayer.prototype.getCallbackMethod=function(Dd){return"xmp.NativePlayerRegistry.findPlayerByType( '"+this.data.group+"', '"+this.type+"' )."+Dd;};xmp.PLATFORMS_NODE_PATH="/PlayerContexts/Global/PlayingPolicy/Platforms";xmp.BROWSER_NODE_PATH="Browser";xmp.PROTOCOL_PARAMETER="{protocol}";xmp.HOST_PARAMETER="{host}";xmp.PATH_PARAMETER="{path}";xmp.EXTENSION_PARAMETER="{extension}";xmp.SIZE_PARAMETER="{size}";xmp.AbstractPlayingPolicy=function(Ed,Fd){this.type=Ed;this.playerPolicy=Fd;};xmp.AbstractPlayingPolicy.prototype.apply=function(Gd,Hd){if(false===this.canApply(Hd)){return true;}
try{this.validatePlatform(Gd.getName(),Hd.getStreamingMode());}
catch(e){this.handleApplyError(Gd,Hd,e,false);return false;}
var Id=this.getApplyPolicy(Hd);var Jd=Id.media.length;for(var i=0;i<Jd;i++){try{var Kd=this.playerPolicy.getMediaType(Id.media[i]);this.validateMedia(Id.type,Id.media[i],Kd);if(false===this.isPlayable(Kd,Hd)){continue;}
this.playerPolicy.getLogger().debug("Applying playing policy \""+Id.type+"\" to playable node.");this.setPolicy(Gd.getName(),Kd,Hd);return true;}
catch(e){var Ld=this.handleApplyError(Gd,Hd,e,this.canFailover(Id.type,Hd,i,Id.media));if(true===Ld){continue;}
return false;}}
var Md=[];try{Md=this.playerPolicy.getSizes();}
catch(e){}
throw new xmp.PlayingPolicyApplyError("Applying playing policy.",Md,Id,Hd);};xmp.AbstractPlayingPolicy.prototype.getType=function(){return this.type;};xmp.AbstractPlayingPolicy.prototype.getApplyPolicy=function(Nd){var Od=[];var Pd=xmp.PLATFORMS_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.OS+"/"+xmp.BROWSER_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.browser+((Nd.getStreamingMode().length>0)?"/"+Nd.getStreamingMode():"");var Qd=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Pd);var Rd=Qd.retrieveKeys();var Sd=Rd.length;for(var i=0;i<Sd;i++){Od.push(Qd.getString(Rd[i],xmp.NO_DEFAULT_VALUE));}
return{type:Pd,media:Od};};xmp.AbstractPlayingPolicy.prototype.isPlayable=function(Td,Ud){if(false===this.validateMimeType(Td,Ud)){return false;}
return this.validateSize(Td,Ud);};xmp.AbstractPlayingPolicy.prototype.setupNode=function(Vd,Wd){if(!Wd.isUriAbsolute()){var Xd=Vd.streamingModes[Wd.getStreamingMode()];var Yd=Xd.url_mask;var Zd=[{name:xmp.PROTOCOL_PARAMETER,value:Xd.protocol},{name:xmp.HOST_PARAMETER,value:this.getHost(Vd,Xd)},{name:xmp.PATH_PARAMETER,value:Wd.getURI()},{name:xmp.SIZE_PARAMETER,value:this.getSize(Vd,Wd)},{name:xmp.EXTENSION_PARAMETER,value:Xd.extension}];for(var i=0;i<Zd.length;i++){Yd=Yd.replace(Zd[i].name,Zd[i].value);}
Wd.setMimeType(Vd.mimeType);Wd.setURI(Yd);this.playerPolicy.getLogger().debug("Setting up playable node URI from mask ("+Xd.url_mask+") and MIME type ("+Vd.mimeType+"). URI - "+Yd);}
Wd.setUriAbsolute(true);};xmp.AbstractPlayingPolicy.prototype.getSize=function($d,ae){var be="";if(true===this.urlMaskContainsSize($d,ae)){be=this.playerPolicy.getSizeFromPlayer(ae.getSizes());}
return be;};xmp.AbstractPlayingPolicy.prototype.getHost=function(ce,de){var ee=xmp.util.SettingsManager.getInstance().getGlobalContextNode();if(false===ee.nodeExists(de.host)){throw new xmp.PlayingPolicyError("Retrieving host.","Unable to find \""+ce.type+"\" playing policy streaming host configuration for \""+de.type+"\".");}
var fe=ee.getNodeForPath(de.host);return fe.getString(xmp.ROOT_URL,xmp.NO_DEFAULT_VALUE);};xmp.AbstractPlayingPolicy.prototype.validateMedia=function(ge,he,ie){if(!ie){throw new xmp.PlayingPolicyError("Validating media.","Invalid \""+ge+"\" playing policy media type \""+he+"\".");}};xmp.AbstractPlayingPolicy.prototype.setPolicy=function(je,ke,le){xmp.NativePlayerRegistry.validate(je,je,ke.mimeType,this.playerPolicy.getPlugins());this.setupNode(ke,le);};xmp.AbstractPlayingPolicy.prototype.validateMimeType=function(me,ne){var oe=ne.getMimeTypes();var pe=oe.length;for(var i=0;i<pe;i++){if(me.mimeType===oe[i]){return true;}}
return false;};xmp.AbstractPlayingPolicy.prototype.validateSize=function(qe,re){if(false===this.urlMaskContainsSize(qe,re)){return true;}
return(this.playerPolicy.getSizeFromPlayer(re.getSizes()).length>0);};xmp.AbstractPlayingPolicy.prototype.urlMaskContainsSize=function(se,te){return(se.streamingModes[te.getStreamingMode()].url_mask.indexOf(xmp.SIZE_PARAMETER)!==-1);};xmp.AbstractPlayingPolicy.prototype.validateBootstrap=function(ue){};xmp.AbstractPlayingPolicy.prototype.validatePlatform=function(ve,we){var xe=xmp.PLATFORMS_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.OS+"/"+xmp.BROWSER_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.browser+((we&&we.length>0)?("/"+we):"");if(false===xmp.util.SettingsManager.getInstance().getGlobalContextNode().nodeExists(xe)){throw new xmp.UnsupportedPlatformError(ve,"The platform \""+xe+"\" is unsupported.");}};xmp.AbstractPlayingPolicy.prototype.handleApplyError=function(ye,ze,e,Ae){if(true===this.playerPolicy.getFailover()&&true===Ae){this.playerPolicy.getLogger().warn("\n\n"+e.message,e);return true;}
this.playerPolicy.getLogger().critical("\n\n"+e.message,e);ye.onError(ze,e);return false;};xmp.AbstractPlayingPolicy.prototype.canApply=function(Be){var Ce=Be.getStreamingMode();return((Ce&&Ce.length>0)?true:false);};xmp.AbstractPlayingPolicy.prototype.canFailover=function(De,Ee,Fe,Ge){try{var He=Ge.length;for(var i=Fe+1;i<He;i++){var Ie=this.playerPolicy.getMediaType(Ge[i]);this.validateMedia(De,Ge[i],Ie);if(false===this.isPlayable(Ie,Ee)){continue;}
return true;}}
catch(e){}
return false;};xmp.BANDWIDTH_RECORDER_SAMPLE_TIMER="BandwidthRecorderSampleTimer";xmp.CURRENT_BANDWIDTH_LABEL="CurrentBandwidth";xmp.CUMULATIVE_BANDWIDTH_LABEL="CumulativeBandwidth";xmp.BANDWIDTH_SAMPLE_INTERVAL="Bandwidth Sample Interval";xmp.BandwidthRecorder=function(Je,Ke){var Le=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Ke).getInt(xmp.BANDWIDTH_SAMPLE_INTERVAL,-1);if(-1===Le.length){throw new xmp.BandwidthRecorderError("Initializing.","Missing bandwidth recorder sample interval.");}
this.player=Je;this.logger=new xmp.util.internals.CategoryLogger('BandwidthRecorder');var Me=new xmp.util.Callback(xmp.BANDWIDTH_RECORDER_SAMPLE_TIMER,this.onSample,this);this.sampleTimer=new xmp.util.Timer(xmp.BANDWIDTH_RECORDER_SAMPLE_TIMER,Le,-1,Me);this.totalBytesDownloaded=0;this.totalDuration=0;this.reset();};xmp.BandwidthRecorder.prototype.start=function(){this.stop();this.sampleStartTime=this.initSampleTime();this.sampleTimer.start();};xmp.BandwidthRecorder.prototype.stop=function(){this.sampleTimer.stop();this.totalDuration+=this.lastDuration;this.totalBytesDownloaded+=this.lastBytesDownloaded;this.reset();};xmp.BandwidthRecorder.prototype.onSample=function(Ne,Oe){try{var Pe=this.player.getBufferingProgress();this.validateSample(Pe);var Qe=this.initSampleTime();var Re=(Qe-this.sampleStartTime);var Se=this.calcBandwidth(Re,Pe.bytesDownloaded);this.logBandwidth(Se,xmp.CURRENT_BANDWIDTH_LABEL,Pe.bytesDownloaded,"Downloaded Bytes");var Te=(this.totalBytesDownloaded+Pe.bytesDownloaded);Se=this.calcBandwidth((this.totalDuration+Re),Te);this.logBandwidth(Se,xmp.CUMULATIVE_BANDWIDTH_LABEL,Te,"Cumulative Bytes");this.lastBytesDownloaded=Pe.bytesDownloaded;this.lastDuration=Re;if(100===Pe.percent){this.stop();}}
catch(e){this.logger.warn("\n\n"+e.message);this.stop();}};xmp.BandwidthRecorder.prototype.reset=function(){this.sampleStartTime=0;this.lastBytesDownloaded=0;this.lastDuration=0;};xmp.BandwidthRecorder.prototype.initSampleTime=function(){return(new Date()).getTime();};xmp.BandwidthRecorder.prototype.calcBandwidth=function(Ue,b){try{var Ve=(Ue/1000);var x=((b*8)/1024);return(x/Ve);}
catch(e){var We=new xmp.BandwidthRecorderError("Calculating bandwidth.",e.message);We.setInnerError(e);throw We;}};xmp.BandwidthRecorder.prototype.logBandwidth=function(Xe,Ye,Ze,$e){try{var af=Math.ceil(Xe)+"KB/sec";this.logger.info(Ye+":  "+af+", "+$e+":  "+Ze);xmp.util.PlayerStats.getInstance().setValue(Ye,af);}
catch(e){var bf=new xmp.BandwidthRecorderError("Logging bandwidth.",((e.rawMessage)?e.rawMessage:e.message));bf.setInnerError(e);throw bf;}};xmp.BandwidthRecorder.prototype.validateSample=function(cf){if(!cf){throw new xmp.BandwidthRecorderError("Validating sample.","Missing sample.");}
if(false===xmp.isDefined(cf.bytesDownloaded)){throw new xmp.BandwidthRecorderError("Validating sample.","Missing bytes downloaded.");}};xmp.LAZY_PLAYING_POLICY="Lazy";xmp.VALIDATE_ON_BOOTSTRAP="ValidateOnBootstrap";xmp.LazyPlayingPolicy=function(df){xmp.LazyPlayingPolicy.ctor.call(this,xmp.LAZY_PLAYING_POLICY,df);};xmp.DERIVE_CLASS(xmp.AbstractPlayingPolicy,xmp.LazyPlayingPolicy);xmp.LazyPlayingPolicy.prototype.validateBootstrap=function(ef){try{this.validatePlatform(xmp.VALIDATE_ON_BOOTSTRAP);xmp.NativePlayerRegistry.createGroup(xmp.VALIDATE_ON_BOOTSTRAP,ef);var ff=this.playerPolicy.getPlugins();var gf=this.playerPolicy.getBootstrapMedia();for(var i=0;i<gf.length;i++){xmp.NativePlayerRegistry.validate(xmp.VALIDATE_ON_BOOTSTRAP,xmp.VALIDATE_ON_BOOTSTRAP,gf[i].mimeType,ff);}}
catch(e){this.playerPolicy.getLogger().fatal("\n\n"+e.message,e);if(e.plugIn){ef.onPlugInError(e);}
else if(true===(e instanceof xmp.UnsupportedPlatformError)){ef.onUnsupportedPlatformError(e);}}
finally{xmp.NativePlayerRegistry.destoryGroup(xmp.VALIDATE_ON_BOOTSTRAP);}};xmp.NativePlayerRegistry=function(){var hf={};return{createGroup:function(jf,kf){if(hf[jf]!==null&&true===xmp.isDefined(hf[jf])){throw new xmp.NativePlayerError("Creating group.","A native player group already exists with the name \""+jf+"\".",null);}
hf[jf]={owner:kf,players:[new xmp.FlashPlayer(kf),new xmp.ImagePlayer(kf),new xmp.WindowsMediaPlayer(kf),new xmp.WindowsMediaPlugInPlayer(kf),new xmp.QuickTimePlayer(kf),new xmp.DHTMLPlayer(kf),new xmp.MockNativePlayer(kf)]};},findPlayerByMIMEType:function(lf,mf){var nf=hf[lf];for(var i=0;i<nf.players.length;i++){if(true===nf.players[i].canAccept(mf)){return nf.players[i];}}
return null;},canAccept:function(of,pf){return((pf===xmp.NULL_MIME_TYPE)||(this.findPlayerByMIMEType(of,pf)!==null));},findPlayerByType:function(qf,rf){var sf=hf[qf];for(var i=0;i<sf.players.length;i++){if(sf.players[i].type===rf){return sf.players[i];}}
throw new xmp.NativePlayerError("Finding player by type.","Unable to find native player for type \""+rf+"\".",null);},validate:function(tf,uf,vf,wf){var xf=hf[tf];for(var i=0;i<xf.players.length;i++){if(true===xf.players[i].canAccept(vf)){xf.players[i].validate(uf,wf);return;}}
throw new xmp.NativePlayerError("Validating player.","Unable to find native player for type \""+vf+"\".",null);},getNullPlayer:function(){return new xmp.NullPlayer();},getGroupOwner:function(yf){var zf=hf[yf];return zf.owner;},destoryGroup:function(Af){var Bf=hf[Af];if(!Bf){return;}
for(var i=0;i<Bf.players.length;i++){Bf.players[i].fini();}
hf[Af]=null;}};}();xmp.NULL_PLAYER="Null";xmp.NULL_MIME_TYPE="null";xmp.NullPlayer=function(){xmp.NullPlayer.ctor.call(this,xmp.NULL_PLAYER,null);};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.NullPlayer);xmp.NullPlayer.prototype.canAccept=function(Cf){return(xmp.NULL_MIME_TYPE.indexOf(Cf)!==-1);};xmp.NullPlayer.prototype.create=function(Df){Df.id=Df.viewport.name;if(Df.viewport&&Df.viewport.type==xmp.DHTML_VIEWPORT){Df.viewport.getNative().style.backgroundColor=xmp.BLACK_BACKGROUND_COLOR;Df.viewport.getNative().innerHTML="";}
xmp.NullPlayer.base.create.call(this,Df);};xmp.PlayerPolicy=function(){var Ef="/PlayerContexts/Global/PlayingPolicy";var Ff="PlayingPolicy/MediaTypes";var Gf="PlayingPolicy/PlugIns";var Hf="Strategy";var If="PlayingPolicy/Streaming Modes";var Jf="PlayingPolicy/Bootstrap Media";var Kf="mime-type";var Lf="url-mask";var Mf="protocol";var Nf="extension";var Of="host";var Pf="display-name";var Qf="download-url";var Rf="version";var Sf="Failover";var Tf="BasePlayer/PlayerSizes";return{initMediaTypes:function(){this.mediaTypes={};var Uf=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var Vf=Uf.getNodeForPath(Ff);var Wf=Vf.retrieveChildren();var Xf=Wf.length;for(var i=0;i<Xf;i++){var Yf=Wf[i];var Zf=Yf.getString(Kf,xmp.NO_DEFAULT_VALUE);this.validateMimeType(Yf.getName(),Zf);var $f={type:Yf.getName(),mimeType:Zf,streamingModes:{}};var ag=this.initStreamingModes(Uf);var bg=ag.length;for(var j=0;j<bg;j++){var cg=this.getStreamingMode(Yf.getName(),Yf,ag[j]);if(cg){$f.streamingModes[ag[j]]=cg;}}
this.mediaTypes[$f.type]=$f;}},initPlugins:function(){this.plugIns={};var dg=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var eg=dg.getNodeForPath(Gf);var fg=eg.retrieveChildren();var gg=fg.length;for(var i=0;i<gg;i++){var hg=fg[i];var ig={displayName:hg.getString(Pf,xmp.NO_DEFAULT_VALUE),version:hg.getString(Rf,xmp.NO_DEFAULT_VALUE),downloadUrl:hg.getString(Qf,xmp.NO_DEFAULT_VALUE)};this.validatePlugIn(ig);this.plugIns[hg.getName()]=ig;}},apply:function(jg,kg){this.init();return this.getStrategy().apply(jg,kg);},validateMimeType:function(lg,mg){if(!mg){throw new xmp.InvalidMimeTypeError("Validating player policy media mime type.","NULL \""+lg+"\" playing policy MIME type \""+mg+"\".");}
if(mg.length===0){throw new xmp.InvalidMimeTypeError("Validating player policy media mime type.","Missing \""+lg+"\" playing policy MIME type \""+mg+"\".");}},getStreamingMode:function(ng,og,pg){if(false===og.nodeExists(pg)){return null;}
var qg=og.getNodeForPath(pg);var rg={type:pg,url_mask:qg.getString(Lf,xmp.NO_DEFAULT_VALUE),protocol:qg.getString(Mf,xmp.NO_DEFAULT_VALUE),extension:qg.getString(Nf,xmp.NO_DEFAULT_VALUE),host:qg.getString(Of,xmp.NO_DEFAULT_VALUE)};this.validateStreamingMode(ng,pg,rg);return rg;},validateStreamingMode:function(sg,tg,ug){if(ug.url_mask.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+sg+"\" playing policy \""+tg+"\" url mask.");}
if(ug.url_mask.indexOf(xmp.PROTOCOL_PARAMETER)!==-1&&ug.protocol.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+sg+"\" playing policy \""+tg+"\" protocol.  The protocol is referenced in the url mask.");}
if(ug.url_mask.indexOf(xmp.HOST_PARAMETER)!==-1&&ug.host.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+sg+"\" playing policy \""+tg+"\" host.  The host is referenced in the url mask.");}
if(ug.url_mask.indexOf(xmp.EXTENSION_PARAMETER)!==-1&&ug.extension.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+sg+"\" playing policy \""+tg+"\" extension.  The extension is referenced in the url mask.");}},getStrategy:function(){if(this.strategy===null){var vg=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Ef);var wg=vg.getString(Hf,xmp.NO_DEFAULT_VALUE);if(wg.length===0){throw new xmp.PlayingPolicyError("Retrieving strategy.","Missing playing policy strategy.  Expected \"Lazy\".");}
this.strategy=xmp.PlayingPolicyFactory.createStrategy(wg,this);this.getLogger().debug("Created player policy \""+wg+"\" strategy.");}
return this.strategy;},getMediaType:function(xg){return this.mediaTypes[xg];},getPlugins:function(){this.init();return this.plugIns;},validatePlugIn:function(yg){if(yg.displayName.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin display name.");}
if(yg.version.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin \""+yg.displayName+"\" version.");}
if(yg.downloadUrl.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin \""+yg.displayName+"\" download url.");}},getLogger:function(){return this.logger;},init:function(){if(this.initialized&&true===this.initialized){return;}
this.strategy=null;this.logger=new xmp.util.internals.CategoryLogger('PlayerPolicy');xmp.util.PlayerStats.getInstance().setValue("OS",navigator.platform);xmp.util.PlayerStats.getInstance().setValue("Browser",navigator.userAgent);this.initMediaTypes();this.initBootstrapMedia();this.initPlugins();this.initialized=true;},getFailover:function(){if(!this.failover){var zg=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Ef);this.failover=zg.getBoolean(Sf,false);}
return this.failover;},getSizes:function(){this.init();if(!this.playerSizes){this.initPlayerSizes();}
return this.playerSizes;},getSizeFromPlayer:function(Ag){this.init();var Bg=this.getSizes();var Cg=Bg.length;for(var i=0;i<Cg;i++){var Dg=Ag.length;for(var j=0;j<Dg;j++){if(Bg[i]===Ag[j]){return Bg[i];}}}
return"";},initPlayerSizes:function(){this.playerSizes=[];var Eg=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath(Tf);var Fg=Eg.retrieveKeys();var Gg=Fg.length;if(Gg===0){throw new xmp.PlayingPolicyError("Validating player sizes.","Missing player sizes.");}
for(var i=0;i<Gg;i++){var Hg=Eg.getString(Fg[i],xmp.NO_DEFAULT_VALUE);if(Hg.length===0){throw new xmp.PlayingPolicyError("Validating player size.","Missing player size.");}
this.playerSizes.push(Hg);}},validateBootstrap:function(Ig){this.init();this.getStrategy().validateBootstrap(Ig);},initStreamingModes:function(Jg){var Kg=Jg.getNodeForPath(If);var Lg=Kg.retrieveKeys();var Mg=Lg.length;this.modes=[];for(var i=0;i<Mg;i++){this.modes.push(Kg.getString(Lg[i],xmp.NO_DEFAULT_VALUE));}
return this.modes;},getStreamingModes:function(){this.init();if(!this.modes){throw new xmp.PlayingPolicyError("Retrieving streaming modes.","Missing modes.");}
if(this.modes.length===0){throw new xmp.PlayingPolicyError("Validating streaming modes.","Missing modes.");}
return this.modes;},initBootstrapMedia:function(){var Ng=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Jf);var Og=Ng.retrieveKeys();var Pg=Og.length;if(Pg===0){throw new xmp.PlayingPolicyError("Validating bootstrap media.","Missing media.");}
this.bootstrapMedia=[];for(var i=0;i<Pg;i++){var Qg=Ng.getString(Og[i],xmp.NO_DEFAULT_VALUE);var Rg=this.getMediaType(Qg);if(!Rg){throw new xmp.PlayingPolicyError("Validating bootstrap media.","Invalid bootstrap media type \""+Qg+"\".");}
this.bootstrapMedia.push(Rg);}
return this.bootstrapMedia;},getBootstrapMedia:function(){this.init();if(!this.bootstrapMedia){throw new xmp.PlayingPolicyError("Retrieving bootstrap media.","Missing media.");}
return this.bootstrapMedia;}};}();xmp.PlayingPolicyFactory=function(){return{createStrategy:function(Sg,Tg){if(Sg===xmp.LAZY_PLAYING_POLICY){return new xmp.LazyPlayingPolicy(Tg);}
throw new xmp.PlayingPolicyError("Creating playing policy strategy.","Unable to create playing policy strategy \""+Sg+"\".");}};}();xmp.BandwidthRecorderError=function(Ug,Vg){xmp.BandwidthRecorderError.ctor.call(this,"BandwidthRecorderError",Ug,Vg);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.BandwidthRecorderError);xmp.DHTMLObjectError=function(Wg,Xg){xmp.DHTMLObjectError.ctor.call(this,"DHTMLObjectError",Wg,Xg);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.DHTMLObjectError);xmp.InvalidMimeTypeError=function(Yg,Zg){xmp.InvalidMimeTypeError.ctor.call(this,"InvalidMimeTypeError",Yg,Zg);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.InvalidMimeTypeError);xmp.InvalidPlayableNodeError=function($g,ah){xmp.InvalidPlayableNodeError.ctor.call(this,"InvalidMimeTypeError",$g,ah);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.InvalidPlayableNodeError);xmp.InvalidPlugInVersionError=function(bh,ch,dh){var eh="Invalid "+ch.displayName+" version \""+dh+"\".  Expected version is \""+ch.version+"\" or greater.  \n\nThe latest plugin can be downloaded at \""+ch.downloadUrl+"\".";xmp.InvalidPlugInVersionError.ctor.call(this,"InvalidPlugInVersionError",bh,eh,ch);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.InvalidPlugInVersionError);xmp.MediaPlayerError=function(fh,gh){xmp.MediaPlayerError.ctor.call(this,"MediaPlayerError",fh,gh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.MediaPlayerError);xmp.NativePlayerConnectionError=function(hh,ih,jh,kh){var lh=[{label:"Native Player Type",text:((jh)?jh.getType():"")},{label:"Native Player Name",text:((jh)?jh.getName():"")}];if(kh){var mh=kh.length;for(var i=0;i<mh;i++){lh.push(kh[i]);}}
xmp.NativePlayerConnectionError.ctor.call(this,xmp.XmpErrorCodes.CRITICAL_PLAYER_CONNECTION,"NativePlayerConnectionError",hh,ih,lh);};xmp.DERIVE_CLASS(xmp.CriticalException,xmp.NativePlayerConnectionError);xmp.NativePlayerError=function(nh,oh,ph,qh){var rh=[{label:"Native Player Type",text:((ph)?ph.getType():"")},{label:"Native Player Name",text:((ph)?ph.getName():"")}];if(qh){var sh=qh.length;for(var i=0;i<sh;i++){rh.push(qh[i]);}}
xmp.NativePlayerError.ctor.call(this,"NativePlayerError",nh,oh,rh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.NativePlayerError);xmp.NativePlayerUnsupportedError=function(th,uh,vh){var wh=[{label:"Native Player Type",text:((vh)?vh.getType():"")},{label:"Native Player Name",text:((vh)?vh.getName():"")}];xmp.NativePlayerUnsupportedError.ctor.call(this,"NativePlayerUnsupportedError",th,uh,wh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.NativePlayerUnsupportedError);xmp.PlaybackModeError=function(xh,yh,zh){var Ah=[{label:"Playback Mode",text:((zh)?zh.getName():"")}];xmp.PlaybackModeError.ctor.call(this,"PlaybackModeError",xh,yh,Ah);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlaybackModeError);xmp.PlayingPolicyApplyError=function(Bh,Ch,Dh,Eh){var Fh="Unable to apply playing policy to playable node.\n\nPlayer Sizes:              "+Ch.join(", ")+"\n\nPolicy:"+"\n\n  Type:                     "+Dh.type+"\n  Media:                   "+Dh.media.join(", ")+"\n\nPlayable Node:"+"\n\n  Location:               "+Eh.getURI()+"\n  Streaming Mode:  "+Eh.getStreamingMode()+"\n  Mime Types:         "+Eh.getMimeTypes().join(", ")+"\n  Sizes:                   "+Eh.getSizes().join(", ");xmp.PlayingPolicyApplyError.ctor.call(this,"PlayingPolicyApplyError",Bh,Fh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlayingPolicyApplyError);xmp.PlayingPolicyError=function(Gh,Hh){xmp.PlayingPolicyError.ctor.call(this,"PlayingPolicyError",Gh,Hh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlayingPolicyError);xmp.PlugInDisabledError=function(Ih,Jh,Kh){var Lh="The "+Jh.displayName+" is disabled or not associated with the \""+Kh+"\" MIME type.";xmp.PlugInDisabledError.ctor.call(this,"PlugInDisabledError",Ih,Lh,Jh);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.PlugInDisabledError);xmp.PlugInNotFoundError=function(Mh,Nh){var Oh=Nh.displayName+" not found.  \n\nThe plugin can be downloaded at \""+Nh.downloadUrl+"\".";xmp.PlugInNotFoundError.ctor.call(this,"PlugInNotFoundError",Mh,Oh,Nh);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.PlugInNotFoundError);xmp.ServiceError=function(Ph,Qh){xmp.ServiceError.ctor.call(this,"ServiceError",Ph,Qh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.ServiceError);xmp.UnsupportedPlatformError=function(Rh,Sh){xmp.UnsupportedPlatformError.ctor.call(this,xmp.XmpErrorCodes.FATAL_PLATFORM,"UnsupportedPlatformError",Rh,Sh);};xmp.DERIVE_CLASS(xmp.FatalException,xmp.UnsupportedPlatformError);xmp.DefaultPlaybackMode=function(Th,Uh,Vh){xmp.DefaultPlaybackMode.ctor.call(this,Th,Uh,Vh);};xmp.DERIVE_CLASS(xmp.PlaybackMode,xmp.DefaultPlaybackMode);xmp.DefaultPlaybackMode.prototype.open=function(Wh,Xh){this.changeMode(Wh,xmp.READY,xmp.OPEN_OPERATION,Xh);};xmp.DefaultPlaybackMode.prototype.close=function(Yh){this.changeMode(Yh,xmp.IDLE,xmp.CLOSE_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.play=function(Zh){this.changeMode(Zh,xmp.PLAY,xmp.PLAY_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.pause=function($h){this.changeMode($h,xmp.PAUSE,xmp.PAUSE_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.stop=function(ai){this.changeMode(ai,xmp.STOP,xmp.STOP_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.rewind=function(bi){this.changeMode(bi,xmp.REWIND,xmp.REWIND_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.fastForward=function(ci){this.changeMode(ci,xmp.FAST_FORWARD,xmp.FAST_FORWARD_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.seek=function(di,ei){this.changeMode(di,xmp.SEEKABLE,xmp.SEEK_OPERATION,ei);};xmp.DefaultPlaybackMode.prototype.ended=function(fi){this.changeMode(fi,xmp.ENDED,xmp.ENDED_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.error=function(gi){this.changeMode(gi,xmp.ERRORS,xmp.ERROR_OPERATION,null);};xmp.ENDED_PLAYBACK_STATE="EndedPlayback";xmp.ENDED="Ended";xmp.ENDED_OPERATION="Ended";xmp.EndedPlaybackMode=function(){xmp.EndedPlaybackMode.ctor.call(this,xmp.ENDED,xmp.ENDED_PLAYBACK_STATE,[xmp.IDLE,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.EndedPlaybackMode);xmp.EndedPlaybackMode.prototype.transition=function(hi,ii,ji){this.ended(hi);};xmp.EndedPlaybackMode.prototype.ended=function(ki){try{this.getPlayer(ki).ended();}
catch(e){this.handleError(ki,xmp.ENDED_OPERATION,e);}};xmp.ERRORS_PLAYBACK_STATE="ErrorPlayback";xmp.ERRORS="Error";xmp.ERROR_OPERATION="Error";xmp.ErrorPlaybackMode=function(){xmp.ErrorPlaybackMode.ctor.call(this,xmp.ERRORS,xmp.ERRORS_PLAYBACK_STATE,[xmp.IDLE]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.ErrorPlaybackMode);xmp.ErrorPlaybackMode.prototype.transition=function(li,mi,ni){this.error(li);};xmp.ErrorPlaybackMode.prototype.error=function(oi){try{this.getPlayer(oi).error();}
catch(e){this.handleError(oi,xmp.ERROR_OPERATION,e);}};xmp.FAST_FORWARD_PLAYBACK_STATE="FastForwardPlayback";xmp.FAST_FORWARD="FastForward";xmp.FAST_FORWARD_OPERATION="FastForward";xmp.FastForwardPlaybackMode=function(){xmp.FastForwardPlaybackMode.ctor.call(this,xmp.FAST_FORWARD,xmp.FAST_FORWARD_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.FastForwardPlaybackMode);xmp.FastForwardPlaybackMode.prototype.transition=function(pi,qi,ri){this.fastForward(pi);};xmp.FastForwardPlaybackMode.prototype.fastForward=function(si){try{this.getPlayer(si).fastForward();}
catch(e){this.handleError(si,xmp.FAST_FORWARD_OPERATION,e);}};xmp.IDLE_PLAYBACK_STATE="IdlePlayback";xmp.IDLE="Idle";xmp.CLOSE_OPERATION="Close";xmp.IdlePlaybackMode=function(){xmp.IdlePlaybackMode.ctor.call(this,xmp.IDLE,xmp.IDLE_PLAYBACK_STATE,[xmp.READY,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.IdlePlaybackMode);xmp.IdlePlaybackMode.prototype.transition=function(ti,ui,vi){try{this.getPlayer(ti).close();}
catch(e){this.handleError(ti,xmp.CLOSE_OPERATION,e);}};xmp.IdlePlaybackMode.prototype.close=function(wi){};xmp.NORMAL_PLAYBACK_STATE="NormalPlayback";xmp.PLAY="Play";xmp.PLAY_OPERATION="Play";xmp.NormalPlaybackMode=function(){xmp.NormalPlaybackMode.ctor.call(this,xmp.PLAY,xmp.NORMAL_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.NormalPlaybackMode);xmp.NormalPlaybackMode.prototype.transition=function(xi,yi,zi){this.play(xi);};xmp.NormalPlaybackMode.prototype.play=function(Ai){try{this.getPlayer(Ai).play();}
catch(e){this.handleError(Ai,xmp.PLAY_OPERATION,e);}};xmp.PAUSE_PLAYBACK_STATE="PausePlayback";xmp.PAUSE="Pause";xmp.PAUSE_OPERATION="Pause";xmp.PausePlaybackMode=function(){xmp.PausePlaybackMode.ctor.call(this,xmp.PAUSE,xmp.PAUSE_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.PausePlaybackMode);xmp.PausePlaybackMode.prototype.transition=function(Bi,Ci,Di){this.pause(Bi);};xmp.PausePlaybackMode.prototype.pause=function(Ei){try{this.getPlayer(Ei).pause();}
catch(e){this.handleError(Ei,xmp.PAUSE_OPERATION,e);}};xmp.PlayerModeRegistry=function(){this.modes=[];var Fi=[new xmp.ReadyPlaybackMode(),new xmp.IdlePlaybackMode(),new xmp.PausePlaybackMode(),new xmp.NormalPlaybackMode(),new xmp.PausePlaybackMode(),new xmp.StopPlaybackMode(),new xmp.RewindPlaybackMode(),new xmp.FastForwardPlaybackMode(),new xmp.SeekablePlaybackMode(),new xmp.EndedPlaybackMode(),new xmp.ErrorPlaybackMode()];for(var i=0;i<Fi.length;i++){this.addMode(Fi[i]);}};xmp.PlayerModeRegistry.prototype.addMode=function(Gi){this.modes[Gi.type]=Gi;};xmp.PlayerModeRegistry.prototype.findMode=function(Hi){var Ii=this.modes[Hi];if(Ii!==null){return Ii;}
throw new xmp.PlaybackModeError("Finding playback mode.","Unable to find player mode \""+Hi+"\".",null);};xmp.READY_PLAYBACK_STATE="ReadyPlayback";xmp.READY="Ready";xmp.OPEN_OPERATION="Open";xmp.ReadyPlaybackMode=function(){xmp.ReadyPlaybackMode.ctor.call(this,xmp.READY,xmp.READY_PLAYBACK_STATE,[xmp.IDLE,xmp.PLAY,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.ReadyPlaybackMode);xmp.ReadyPlaybackMode.prototype.transition=function(Ji,Ki,Li){this.open(Ji,Ki);};xmp.ReadyPlaybackMode.prototype.open=function(Mi,Ni){try{this.getPlayer(Mi).open(Ni);}
catch(e){this.handleError(Mi,xmp.OPEN_OPERATION,e);}};xmp.REWIND_PLAYBACK_STATE="RewindPlayback";xmp.REWIND="Rewind";xmp.REWIND_OPERATION="Rewind";xmp.RewindPlaybackMode=function(){xmp.RewindPlaybackMode.ctor.call(this,xmp.REWIND,xmp.REWIND_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.RewindPlaybackMode);xmp.RewindPlaybackMode.prototype.transition=function(Oi,Pi,Qi){this.rewind(Oi);};xmp.RewindPlaybackMode.prototype.rewind=function(Ri){try{this.getPlayer(Ri).rewind();}
catch(e){this.handleError(Ri,xmp.REWIND_OPERATION,e);}};xmp.SEEKABLE_PLAYBACK_STATE="SeekablePlayback";xmp.SEEKABLE="Seekable";xmp.SEEK_OPERATION="Seek";xmp.SeekablePlaybackMode=function(){xmp.SeekablePlaybackMode.ctor.call(this,xmp.SEEKABLE,xmp.SEEKABLE_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.SeekablePlaybackMode);xmp.SeekablePlaybackMode.prototype.transition=function(Si,Ti,Ui){this.seek(Si,Ti);};xmp.SeekablePlaybackMode.prototype.seek=function(Vi,Wi){try{this.getPlayer(Vi).seek(Wi);}
catch(e){this.handleError(Vi,xmp.SEEK_OPERATION,e);}};xmp.STOP_PLAYBACK_STATE="StopPlayback";xmp.STOP="Stop";xmp.STOP_OPERATION="Stop";xmp.StopPlaybackMode=function(){xmp.StopPlaybackMode.ctor.call(this,xmp.STOP,xmp.STOP_PLAYBACK_STATE,[xmp.IDLE,xmp.ENDED,xmp.ERRORS]);};xmp.DERIVE_CLASS(xmp.DefaultPlaybackMode,xmp.StopPlaybackMode);xmp.StopPlaybackMode.prototype.transition=function(Xi,Yi,Zi){this.stop(Xi);};xmp.StopPlaybackMode.prototype.stop=function($i){try{this.getPlayer($i).stop();}
catch(e){this.handleError($i,xmp.STOP_OPERATION,e);}};