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();}
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.NATIVE_PLAYER_EVENT_DISPATCH_HANDLER="XmpDispatchNativePlayerEvent";function XmpDispatchNativePlayerEvent(){var mc=null;try{mc=xmp.NativePlayerRegistry.findPlayerByType(arguments[0],arguments[1]);var nc=arguments[2];var oc=[];for(var i=3;i<arguments.length;i++){oc.push(arguments[i]);}
mc[nc].apply(mc,oc);}
catch(e){if(mc){mc.setError("Dispatching event.",e);}
else{xmp.handleFatalError(e);}}}
xmp.AbstractNativePlayer=function(pc,qc){this.type=pc;this.listener=qc;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(rc){};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 sc=this.getNative();var tc=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?sc.parentElement:sc.parentNode);tc.removeChild(sc);}
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(uc){this.startMonitor();};xmp.AbstractNativePlayer.prototype.ended=function(){this.stopMonitor();};xmp.AbstractNativePlayer.prototype.error=function(){this.close();};xmp.AbstractNativePlayer.prototype.isAvailable=function(vc){return false;};xmp.AbstractNativePlayer.prototype.canAccept=function(wc){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(xc){this.volume=xc;};xmp.AbstractNativePlayer.prototype.getMute=function(){return this.mute;};xmp.AbstractNativePlayer.prototype.setMute=function(yc){this.mute=yc;};xmp.AbstractNativePlayer.prototype.getFullscreen=function(){return this.fullscreen;};xmp.AbstractNativePlayer.prototype.setFullscreen=function(zc){this.fullscreen=zc;};xmp.AbstractNativePlayer.prototype.getBufferingProgress=function(){return this.bufferingProgress;};xmp.AbstractNativePlayer.prototype.moveTo=function(Ac,Bc,Cc,Dc){var Ec="left: "+Ac+"; top: "+Bc+"; width: "+Cc+"; height: "+Dc;this.getNative().style.cssText=Ec;};xmp.AbstractNativePlayer.prototype.validate=function(Fc,Gc){if(false===this.plugInValidated){this.onValidatePlugIn(Fc,Gc);this.plugInValidated=true;}};xmp.AbstractNativePlayer.prototype.onValidatePlugIn=function(Hc,Ic){};xmp.AbstractNativePlayer.prototype.setState=function(Jc,Kc){if(Jc===xmp.BUFFERING){this.bufferingProgress=Kc;}
this.createTimer({object:this,id:"setState",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetState,context:{type:Jc,data:Kc}}).start();};xmp.AbstractNativePlayer.prototype.setError=function(Lc,e){this.stopMonitor();var Mc=e;if(false===(Mc instanceof xmp.NativePlayerError)&&false===(Mc instanceof xmp.NativePlayerConnectionError)){Mc=new xmp.NativePlayerError(((e.context)?e.context:Lc),((e.rawMessage)?e.rawMessage:e.message),this);Mc.setInnerError(e);}
this.createTimer({object:this,id:"setError",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetError,context:Mc}).start();};xmp.AbstractNativePlayer.prototype.setTrigger=function(Nc,Oc){this.createTimer({object:this,id:"setTrigger",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetTrigger,context:{name:Nc,data:Oc}}).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(Pc,Qc){return this.listener.onNativePlayerExecuteCommand(Pc,Qc);};xmp.AbstractNativePlayer.prototype.create=function(Rc){this.data=Rc;};xmp.AbstractNativePlayer.prototype.attach=function(Sc){this.data=Sc;};xmp.AbstractNativePlayer.prototype.getNative=function(){var Tc=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?window[this.data.id]:document[this.data.id]);if(!Tc){Tc=document.getElementById(this.data.id);if(!Tc){throw new xmp.NativePlayerError("Retrieving native player.","Unable to retrieve \""+this.type+"\" native player.",this);}}
return Tc;};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(Uc){var Vc=Uc;var Wc=0;var Xc=-1;var Yc=-1;var Zc=-1;var $c=Vc.indexOf(xmp.VERSION_DELIMITER);if($c!==-1){Wc=parseInt(Vc.substr(0,$c),10);Vc=Vc.substr($c+1);$c=Vc.indexOf(xmp.VERSION_DELIMITER);if($c!==-1){Xc=parseInt(Vc.substr(0,$c),10);Vc=Vc.substr($c+1);$c=Vc.indexOf(xmp.VERSION_DELIMITER);if($c!==-1){Yc=parseInt(Vc.substr(0,$c),10);Vc=Vc.substr($c+1);if(Vc.length>0){Zc=parseInt(Vc,10);}}
else{Yc=parseInt(Vc,10);}}
else{Xc=parseInt(Vc,10);}}
else{Wc=parseInt(Vc,10);}
return{major:Wc,minor:Xc,revision:Yc,build:Zc};};xmp.AbstractNativePlayer.prototype.validatePlugInVersion=function(ad,bd,cd,dd){var ed=bd+"PlugInVersion";xmp.util.PlayerStats.getInstance().setValue(ed,cd);var fd=this.parseVersion(cd);var gd=this.getPlugInInfo(dd,bd);var hd=this.parseVersion(gd.version);var jd=[{version:fd.major,expectedVersion:hd.major},{version:fd.minor,expectedVersion:hd.minor},{version:fd.revision,expectedVersion:hd.revision},{version:fd.build,expectedVersion:hd.build}];var kd=jd.length;for(var i=0;i<kd;i++){if(jd[i].version<jd[i].expectedVersion){throw new xmp.InvalidPlugInVersionError(ad,gd,cd);}
if(jd[i].version!==jd[i].expectedVersion){break;}}};xmp.AbstractNativePlayer.prototype.getPlugInInfo=function(ld,md){var nd=ld[md];if(!nd){throw new xmp.NativePlayerError("Retrieving plugin info.","Unable to retrieve \""+md+"\" plugin information.",this);}
return nd;};xmp.AbstractNativePlayer.prototype.createTimer=function(od){var pd=new xmp.util.Callback(od.id,od.handler,od.object);pd.setMetadata(xmp.CONTEXT,od.context);return new xmp.util.Timer(od.id,od.interval,-1,pd);};xmp.AbstractNativePlayer.prototype.onTimelineChange=function(qd,rd){try{var sd=parseInt(this.getDuration(),10);var td=((sd>0)?parseInt(this.getPosition(),10):0);this.listener.onNativePlayerTimelineChange(td,sd);}
catch(e){this.setError("Forwarding timeline change to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetState=function(ud,vd){try{vd.stop();var wd=ud.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerStateChange(wd.type,wd.data);}
catch(e){this.setError("Forwarding state change to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetError=function(xd,yd){var zd=null;try{yd.stop();zd=xd.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerError(zd);}
catch(e){var Ad=((zd)?zd:e);xmp.handleFatalError(Ad);}};xmp.AbstractNativePlayer.prototype.onSetTrigger=function(Bd,Cd){try{Cd.stop();var Dd=Bd.getMetadata(xmp.CONTEXT,{});this.listener.onNativePlayerTrigger(Dd.name,Dd.data);}
catch(e){this.setError("Forwarding trigger to listener.",e);}};xmp.AbstractNativePlayer.prototype.onSetCreated=function(Ed,Fd){try{Fd.stop();this.listener.onNativePlayerCreated(this,this.data);}
catch(e){this.setError("Forwarding created to listener.",e);}};xmp.AbstractNativePlayer.prototype.getCallbackMethod=function(Gd){return"xmp.NativePlayerRegistry.findPlayerByType( '"+this.data.group+"', '"+this.type+"' )."+Gd;};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(Hd,Id){this.type=Hd;this.playerPolicy=Id;};xmp.AbstractPlayingPolicy.prototype.apply=function(Jd,Kd){if(false===this.canApply(Kd)){return true;}
try{this.validatePlatform(Jd.getName(),Kd.getStreamingMode());}
catch(e){this.handleApplyError(Jd,Kd,e,false);return false;}
var Ld=this.getApplyPolicy(Kd);var Md=Ld.media.length;for(var i=0;i<Md;i++){try{var Nd=this.playerPolicy.getMediaType(Ld.media[i]);this.validateMedia(Ld.type,Ld.media[i],Nd);if(false===this.isPlayable(Nd,Kd)){continue;}
this.playerPolicy.getLogger().debug("Applying playing policy \""+Ld.type+"\" to playable node.");this.setPolicy(Jd.getName(),Nd,Kd);return true;}
catch(e){var Od=this.handleApplyError(Jd,Kd,e,this.canFailover(Ld.type,Kd,i,Ld.media));if(true===Od){continue;}
return false;}}
var Pd=[];try{Pd=this.playerPolicy.getSizes();}
catch(e){}
throw new xmp.PlayingPolicyApplyError("Applying playing policy.",Pd,Ld,Kd);};xmp.AbstractPlayingPolicy.prototype.getType=function(){return this.type;};xmp.AbstractPlayingPolicy.prototype.getApplyPolicy=function(Qd){var Rd=[];var Sd=xmp.PLATFORMS_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.OS+"/"+xmp.BROWSER_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.browser+((Qd.getStreamingMode().length>0)?"/"+Qd.getStreamingMode():"");var Td=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Sd);var Ud=Td.retrieveKeys();var Vd=Ud.length;for(var i=0;i<Vd;i++){Rd.push(Td.getString(Ud[i],xmp.NO_DEFAULT_VALUE));}
return{type:Sd,media:Rd};};xmp.AbstractPlayingPolicy.prototype.isPlayable=function(Wd,Xd){if(false===this.validateMimeType(Wd,Xd)){return false;}
return this.validateSize(Wd,Xd);};xmp.AbstractPlayingPolicy.prototype.setupNode=function(Yd,Zd){if(!Zd.isUriAbsolute()){var $d=Yd.streamingModes[Zd.getStreamingMode()];var ae=$d.url_mask;var be=[{name:xmp.PROTOCOL_PARAMETER,value:$d.protocol},{name:xmp.HOST_PARAMETER,value:this.getHost(Yd,$d)},{name:xmp.PATH_PARAMETER,value:Zd.getURI()},{name:xmp.SIZE_PARAMETER,value:this.getSize(Yd,Zd)},{name:xmp.EXTENSION_PARAMETER,value:$d.extension}];for(var i=0;i<be.length;i++){ae=ae.replace(be[i].name,be[i].value);}
Zd.setMimeType(Yd.mimeType);Zd.setURI(ae);this.playerPolicy.getLogger().debug("Setting up playable node URI from mask ("+$d.url_mask+") and MIME type ("+Yd.mimeType+"). URI - "+ae);}
Zd.setUriAbsolute(true);};xmp.AbstractPlayingPolicy.prototype.getSize=function(ce,de){var ee="";if(true===this.urlMaskContainsSize(ce,de)){ee=this.playerPolicy.getSizeFromPlayer(de.getSizes());}
return ee;};xmp.AbstractPlayingPolicy.prototype.getHost=function(fe,ge){var he=xmp.util.SettingsManager.getInstance().getGlobalContextNode();if(false===he.nodeExists(ge.host)){throw new xmp.PlayingPolicyError("Retrieving host.","Unable to find \""+fe.type+"\" playing policy streaming host configuration for \""+ge.type+"\".");}
var ie=he.getNodeForPath(ge.host);return ie.getString(xmp.ROOT_URL,xmp.NO_DEFAULT_VALUE);};xmp.AbstractPlayingPolicy.prototype.validateMedia=function(je,ke,le){if(!le){throw new xmp.PlayingPolicyError("Validating media.","Invalid \""+je+"\" playing policy media type \""+ke+"\".");}};xmp.AbstractPlayingPolicy.prototype.setPolicy=function(me,ne,oe){xmp.NativePlayerRegistry.validate(me,me,ne.mimeType,this.playerPolicy.getPlugins());this.setupNode(ne,oe);};xmp.AbstractPlayingPolicy.prototype.validateMimeType=function(pe,qe){var re=qe.getMimeTypes();var se=re.length;for(var i=0;i<se;i++){if(pe.mimeType===re[i]){return true;}}
return false;};xmp.AbstractPlayingPolicy.prototype.validateSize=function(te,ue){if(false===this.urlMaskContainsSize(te,ue)){return true;}
return(this.playerPolicy.getSizeFromPlayer(ue.getSizes()).length>0);};xmp.AbstractPlayingPolicy.prototype.urlMaskContainsSize=function(ve,we){return(ve.streamingModes[we.getStreamingMode()].url_mask.indexOf(xmp.SIZE_PARAMETER)!==-1);};xmp.AbstractPlayingPolicy.prototype.validateBootstrap=function(xe){};xmp.AbstractPlayingPolicy.prototype.validatePlatform=function(ye,ze){var Ae=xmp.PLATFORMS_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.OS+"/"+xmp.BROWSER_NODE_PATH+"/"+xmp.util.internals.BrowserDetect.browser+((ze&&ze.length>0)?("/"+ze):"");if(false===xmp.util.SettingsManager.getInstance().getGlobalContextNode().nodeExists(Ae)){throw new xmp.UnsupportedPlatformError(ye,"The platform \""+Ae+"\" is unsupported.");}};xmp.AbstractPlayingPolicy.prototype.handleApplyError=function(Be,Ce,e,De){if(true===this.playerPolicy.getFailover()&&true===De){this.playerPolicy.getLogger().warn("\n\n"+e.message,e);return true;}
this.playerPolicy.getLogger().critical("\n\n"+e.message,e);Be.onError(Ce,e);return false;};xmp.AbstractPlayingPolicy.prototype.canApply=function(Ee){var Fe=Ee.getStreamingMode();return((Fe&&Fe.length>0)?true:false);};xmp.AbstractPlayingPolicy.prototype.canFailover=function(Ge,He,Ie,Je){try{var Ke=Je.length;for(var i=Ie+1;i<Ke;i++){var Le=this.playerPolicy.getMediaType(Je[i]);this.validateMedia(Ge,Je[i],Le);if(false===this.isPlayable(Le,He)){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(Me,Ne){var Oe=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Ne).getInt(xmp.BANDWIDTH_SAMPLE_INTERVAL,-1);if(-1===Oe.length){throw new xmp.BandwidthRecorderError("Initializing.","Missing bandwidth recorder sample interval.");}
this.player=Me;this.logger=new xmp.util.internals.CategoryLogger('BandwidthRecorder');var Pe=new xmp.util.Callback(xmp.BANDWIDTH_RECORDER_SAMPLE_TIMER,this.onSample,this);this.sampleTimer=new xmp.util.Timer(xmp.BANDWIDTH_RECORDER_SAMPLE_TIMER,Oe,-1,Pe);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(Qe,Re){try{var Se=this.player.getBufferingProgress();this.validateSample(Se);var Te=this.initSampleTime();var Ue=(Te-this.sampleStartTime);var Ve=this.calcBandwidth(Ue,Se.bytesDownloaded);this.logBandwidth(Ve,xmp.CURRENT_BANDWIDTH_LABEL,Se.bytesDownloaded,"Downloaded Bytes");var We=(this.totalBytesDownloaded+Se.bytesDownloaded);Ve=this.calcBandwidth((this.totalDuration+Ue),We);this.logBandwidth(Ve,xmp.CUMULATIVE_BANDWIDTH_LABEL,We,"Cumulative Bytes");this.lastBytesDownloaded=Se.bytesDownloaded;this.lastDuration=Ue;if(100===Se.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(Xe,b){try{var Ye=(Xe/1000);var x=((b*8)/1024);return(x/Ye);}
catch(e){var Ze=new xmp.BandwidthRecorderError("Calculating bandwidth.",e.message);Ze.setInnerError(e);throw Ze;}};xmp.BandwidthRecorder.prototype.logBandwidth=function($e,af,bf,cf){try{var df=Math.ceil($e)+"KB/sec";this.logger.info(af+":  "+df+", "+cf+":  "+bf);xmp.util.PlayerStats.getInstance().setValue(af,df);}
catch(e){var ef=new xmp.BandwidthRecorderError("Logging bandwidth.",((e.rawMessage)?e.rawMessage:e.message));ef.setInnerError(e);throw ef;}};xmp.BandwidthRecorder.prototype.validateSample=function(ff){if(!ff){throw new xmp.BandwidthRecorderError("Validating sample.","Missing sample.");}
if(false===xmp.isDefined(ff.bytesDownloaded)){throw new xmp.BandwidthRecorderError("Validating sample.","Missing bytes downloaded.");}};xmp.LAZY_PLAYING_POLICY="Lazy";xmp.VALIDATE_ON_BOOTSTRAP="ValidateOnBootstrap";xmp.LazyPlayingPolicy=function(gf){xmp.LazyPlayingPolicy.ctor.call(this,xmp.LAZY_PLAYING_POLICY,gf);};xmp.DERIVE_CLASS(xmp.AbstractPlayingPolicy,xmp.LazyPlayingPolicy);xmp.LazyPlayingPolicy.prototype.validateBootstrap=function(hf){try{this.validatePlatform(xmp.VALIDATE_ON_BOOTSTRAP);xmp.NativePlayerRegistry.createGroup(xmp.VALIDATE_ON_BOOTSTRAP,hf);var jf=this.playerPolicy.getPlugins();var kf=this.playerPolicy.getBootstrapMedia();for(var i=0;i<kf.length;i++){xmp.NativePlayerRegistry.validate(xmp.VALIDATE_ON_BOOTSTRAP,xmp.VALIDATE_ON_BOOTSTRAP,kf[i].mimeType,jf);}}
catch(e){this.playerPolicy.getLogger().fatal("\n\n"+e.message,e);if(e.plugIn){hf.onPlugInError(e);}
else if(true===(e instanceof xmp.UnsupportedPlatformError)){hf.onUnsupportedPlatformError(e);}}
finally{xmp.NativePlayerRegistry.destoryGroup(xmp.VALIDATE_ON_BOOTSTRAP);}};xmp.NativePlayerRegistry=function(){var lf={};return{createGroup:function(mf,nf){if(lf[mf]!==null&&true===xmp.isDefined(lf[mf])){throw new xmp.NativePlayerError("Creating group.","A native player group already exists with the name \""+mf+"\".",null);}
lf[mf]={owner:nf,players:[new xmp.FlashPlayer(nf),new xmp.ImagePlayer(nf),new xmp.WindowsMediaPlayer(nf),new xmp.WindowsMediaPlugInPlayer(nf),new xmp.QuickTimePlayer(nf),new xmp.DHTMLPlayer(nf),new xmp.MockNativePlayer(nf)]};},findPlayerByMIMEType:function(of,pf){var qf=lf[of];for(var i=0;i<qf.players.length;i++){if(true===qf.players[i].canAccept(pf)){return qf.players[i];}}
return null;},canAccept:function(rf,sf){return((sf===xmp.NULL_MIME_TYPE)||(this.findPlayerByMIMEType(rf,sf)!==null));},findPlayerByType:function(tf,uf){var vf=lf[tf];for(var i=0;i<vf.players.length;i++){if(vf.players[i].type===uf){return vf.players[i];}}
throw new xmp.NativePlayerError("Finding player by type.","Unable to find native player for type \""+uf+"\".",null);},validate:function(wf,xf,yf,zf){var Af=lf[wf];for(var i=0;i<Af.players.length;i++){if(true===Af.players[i].canAccept(yf)){Af.players[i].validate(xf,zf);return;}}
throw new xmp.NativePlayerError("Validating player.","Unable to find native player for type \""+yf+"\".",null);},getNullPlayer:function(){return new xmp.NullPlayer();},getGroupOwner:function(Bf){var Cf=lf[Bf];return Cf.owner;},destoryGroup:function(Df){var Ef=lf[Df];if(!Ef){return;}
for(var i=0;i<Ef.players.length;i++){Ef.players[i].fini();}
lf[Df]=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(Ff){return(xmp.NULL_MIME_TYPE.indexOf(Ff)!==-1);};xmp.NullPlayer.prototype.create=function(Gf){Gf.id=Gf.viewport.name;if(Gf.viewport&&Gf.viewport.type==xmp.DHTML_VIEWPORT){Gf.viewport.getNative().style.backgroundColor=xmp.BLACK_BACKGROUND_COLOR;Gf.viewport.getNative().innerHTML="";}
xmp.NullPlayer.base.create.call(this,Gf);};xmp.PlayerPolicy=function(){var Hf="/PlayerContexts/Global/PlayingPolicy";var If="PlayingPolicy/MediaTypes";var Jf="PlayingPolicy/PlugIns";var Kf="Strategy";var Lf="PlayingPolicy/Streaming Modes";var Mf="PlayingPolicy/Bootstrap Media";var Nf="mime-type";var Of="url-mask";var Pf="protocol";var Qf="extension";var Rf="host";var Sf="display-name";var Tf="download-url";var Uf="version";var Vf="Failover";var Wf="BasePlayer/PlayerSizes";return{initMediaTypes:function(){this.mediaTypes={};var Xf=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var Yf=Xf.getNodeForPath(If);var Zf=Yf.retrieveChildren();var $f=Zf.length;for(var i=0;i<$f;i++){var ag=Zf[i];var bg=ag.getString(Nf,xmp.NO_DEFAULT_VALUE);this.validateMimeType(ag.getName(),bg);var cg={type:ag.getName(),mimeType:bg,streamingModes:{}};var dg=this.initStreamingModes(Xf);var eg=dg.length;for(var j=0;j<eg;j++){var fg=this.getStreamingMode(ag.getName(),ag,dg[j]);if(fg){cg.streamingModes[dg[j]]=fg;}}
this.mediaTypes[cg.type]=cg;}},initPlugins:function(){this.plugIns={};var gg=xmp.util.SettingsManager.getInstance().getGlobalContextNode();var hg=gg.getNodeForPath(Jf);var ig=hg.retrieveChildren();var jg=ig.length;for(var i=0;i<jg;i++){var kg=ig[i];var lg={displayName:kg.getString(Sf,xmp.NO_DEFAULT_VALUE),version:kg.getString(Uf,xmp.NO_DEFAULT_VALUE),downloadUrl:kg.getString(Tf,xmp.NO_DEFAULT_VALUE)};this.validatePlugIn(lg);this.plugIns[kg.getName()]=lg;}},apply:function(mg,ng){this.init();return this.getStrategy().apply(mg,ng);},validateMimeType:function(og,pg){if(!pg){throw new xmp.InvalidMimeTypeError("Validating player policy media mime type.","NULL \""+og+"\" playing policy MIME type \""+pg+"\".");}
if(pg.length===0){throw new xmp.InvalidMimeTypeError("Validating player policy media mime type.","Missing \""+og+"\" playing policy MIME type \""+pg+"\".");}},getStreamingMode:function(qg,rg,sg){if(false===rg.nodeExists(sg)){return null;}
var tg=rg.getNodeForPath(sg);var ug={type:sg,url_mask:tg.getString(Of,xmp.NO_DEFAULT_VALUE),protocol:tg.getString(Pf,xmp.NO_DEFAULT_VALUE),extension:tg.getString(Qf,xmp.NO_DEFAULT_VALUE),host:tg.getString(Rf,xmp.NO_DEFAULT_VALUE)};this.validateStreamingMode(qg,sg,ug);return ug;},validateStreamingMode:function(vg,wg,xg){if(xg.url_mask.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+vg+"\" playing policy \""+wg+"\" url mask.");}
if(xg.url_mask.indexOf(xmp.PROTOCOL_PARAMETER)!==-1&&xg.protocol.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+vg+"\" playing policy \""+wg+"\" protocol.  The protocol is referenced in the url mask.");}
if(xg.url_mask.indexOf(xmp.HOST_PARAMETER)!==-1&&xg.host.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+vg+"\" playing policy \""+wg+"\" host.  The host is referenced in the url mask.");}
if(xg.url_mask.indexOf(xmp.EXTENSION_PARAMETER)!==-1&&xg.extension.length===0){throw new xmp.PlayingPolicyError("Validating streaming mode.","Missing \""+vg+"\" playing policy \""+wg+"\" extension.  The extension is referenced in the url mask.");}},getStrategy:function(){if(this.strategy===null){var yg=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Hf);var zg=yg.getString(Kf,xmp.NO_DEFAULT_VALUE);if(zg.length===0){throw new xmp.PlayingPolicyError("Retrieving strategy.","Missing playing policy strategy.  Expected \"Lazy\".");}
this.strategy=xmp.PlayingPolicyFactory.createStrategy(zg,this);this.getLogger().debug("Created player policy \""+zg+"\" strategy.");}
return this.strategy;},getMediaType:function(Ag){return this.mediaTypes[Ag];},getPlugins:function(){this.init();return this.plugIns;},validatePlugIn:function(Bg){if(Bg.displayName.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin display name.");}
if(Bg.version.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin \""+Bg.displayName+"\" version.");}
if(Bg.downloadUrl.length===0){throw new xmp.PlayingPolicyError("Validating plugin.","Missing plugin \""+Bg.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 Cg=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Hf);this.failover=Cg.getBoolean(Vf,false);}
return this.failover;},getSizes:function(){this.init();if(!this.playerSizes){this.initPlayerSizes();}
return this.playerSizes;},getSizeFromPlayer:function(Dg){this.init();var Eg=this.getSizes();var Fg=Eg.length;for(var i=0;i<Fg;i++){var Gg=Dg.length;for(var j=0;j<Gg;j++){if(Eg[i]===Dg[j]){return Eg[i];}}}
return"";},initPlayerSizes:function(){this.playerSizes=[];var Hg=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath(Wf);var Ig=Hg.retrieveKeys();var Jg=Ig.length;if(Jg===0){throw new xmp.PlayingPolicyError("Validating player sizes.","Missing player sizes.");}
for(var i=0;i<Jg;i++){var Kg=Hg.getString(Ig[i],xmp.NO_DEFAULT_VALUE);if(Kg.length===0){throw new xmp.PlayingPolicyError("Validating player size.","Missing player size.");}
this.playerSizes.push(Kg);}},validateBootstrap:function(Lg){this.init();this.getStrategy().validateBootstrap(Lg);},initStreamingModes:function(Mg){var Ng=Mg.getNodeForPath(Lf);var Og=Ng.retrieveKeys();var Pg=Og.length;this.modes=[];for(var i=0;i<Pg;i++){this.modes.push(Ng.getString(Og[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 Qg=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(Mf);var Rg=Qg.retrieveKeys();var Sg=Rg.length;if(Sg===0){throw new xmp.PlayingPolicyError("Validating bootstrap media.","Missing media.");}
this.bootstrapMedia=[];for(var i=0;i<Sg;i++){var Tg=Qg.getString(Rg[i],xmp.NO_DEFAULT_VALUE);var Ug=this.getMediaType(Tg);if(!Ug){throw new xmp.PlayingPolicyError("Validating bootstrap media.","Invalid bootstrap media type \""+Tg+"\".");}
this.bootstrapMedia.push(Ug);}
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(Vg,Wg){if(Vg===xmp.LAZY_PLAYING_POLICY){return new xmp.LazyPlayingPolicy(Wg);}
throw new xmp.PlayingPolicyError("Creating playing policy strategy.","Unable to create playing policy strategy \""+Vg+"\".");}};}();xmp.BandwidthRecorderError=function(Xg,Yg){xmp.BandwidthRecorderError.ctor.call(this,"BandwidthRecorderError",Xg,Yg);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.BandwidthRecorderError);xmp.DHTMLObjectError=function(Zg,$g){xmp.DHTMLObjectError.ctor.call(this,"DHTMLObjectError",Zg,$g);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.DHTMLObjectError);xmp.InvalidMimeTypeError=function(ah,bh){xmp.InvalidMimeTypeError.ctor.call(this,"InvalidMimeTypeError",ah,bh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.InvalidMimeTypeError);xmp.InvalidPlayableNodeError=function(ch,dh){xmp.InvalidPlayableNodeError.ctor.call(this,"InvalidMimeTypeError",ch,dh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.InvalidPlayableNodeError);xmp.InvalidPlugInVersionError=function(eh,fh,gh){var hh="Invalid "+fh.displayName+" version \""+gh+"\".  Expected version is \""+fh.version+"\" or greater.  \n\nThe latest plugin can be downloaded at \""+fh.downloadUrl+"\".";xmp.InvalidPlugInVersionError.ctor.call(this,"InvalidPlugInVersionError",eh,hh,fh);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.InvalidPlugInVersionError);xmp.MediaPlayerError=function(ih,jh){xmp.MediaPlayerError.ctor.call(this,"MediaPlayerError",ih,jh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.MediaPlayerError);xmp.NativePlayerConnectionError=function(kh,lh,mh,nh){var oh=[{label:"Native Player Type",text:((mh)?mh.getType():"")},{label:"Native Player Name",text:((mh)?mh.getName():"")}];if(nh){var ph=nh.length;for(var i=0;i<ph;i++){oh.push(nh[i]);}}
xmp.NativePlayerConnectionError.ctor.call(this,xmp.XmpErrorCodes.CRITICAL_PLAYER_CONNECTION,"NativePlayerConnectionError",kh,lh,oh);};xmp.DERIVE_CLASS(xmp.CriticalException,xmp.NativePlayerConnectionError);xmp.NativePlayerError=function(qh,rh,sh,th){var uh=[{label:"Native Player Type",text:((sh)?sh.getType():"")},{label:"Native Player Name",text:((sh)?sh.getName():"")}];if(th){var vh=th.length;for(var i=0;i<vh;i++){uh.push(th[i]);}}
xmp.NativePlayerError.ctor.call(this,"NativePlayerError",qh,rh,uh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.NativePlayerError);xmp.NativePlayerUnsupportedError=function(wh,xh,yh){var zh=[{label:"Native Player Type",text:((yh)?yh.getType():"")},{label:"Native Player Name",text:((yh)?yh.getName():"")}];xmp.NativePlayerUnsupportedError.ctor.call(this,"NativePlayerUnsupportedError",wh,xh,zh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.NativePlayerUnsupportedError);xmp.PlaybackModeError=function(Ah,Bh,Ch){var Dh=[{label:"Playback Mode",text:((Ch)?Ch.getName():"")}];xmp.PlaybackModeError.ctor.call(this,"PlaybackModeError",Ah,Bh,Dh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlaybackModeError);xmp.PlayingPolicyApplyError=function(Eh,Fh,Gh,Hh){var Ih="Unable to apply playing policy to playable node.\n\nPlayer Sizes:              "+Fh.join(", ")+"\n\nPolicy:"+"\n\n  Type:                     "+Gh.type+"\n  Media:                   "+Gh.media.join(", ")+"\n\nPlayable Node:"+"\n\n  Location:               "+Hh.getURI()+"\n  Streaming Mode:  "+Hh.getStreamingMode()+"\n  Mime Types:         "+Hh.getMimeTypes().join(", ")+"\n  Sizes:                   "+Hh.getSizes().join(", ");xmp.PlayingPolicyApplyError.ctor.call(this,"PlayingPolicyApplyError",Eh,Ih);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlayingPolicyApplyError);xmp.PlayingPolicyError=function(Jh,Kh){xmp.PlayingPolicyError.ctor.call(this,"PlayingPolicyError",Jh,Kh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.PlayingPolicyError);xmp.PlugInDisabledError=function(Lh,Mh,Nh){var Oh="The "+Mh.displayName+" is disabled or not associated with the \""+Nh+"\" MIME type.";xmp.PlugInDisabledError.ctor.call(this,"PlugInDisabledError",Lh,Oh,Mh);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.PlugInDisabledError);xmp.PlugInNotFoundError=function(Ph,Qh){var Rh=Qh.displayName+" not found.  \n\nThe plugin can be downloaded at \""+Qh.downloadUrl+"\".";xmp.PlugInNotFoundError.ctor.call(this,"PlugInNotFoundError",Ph,Rh,Qh);};xmp.DERIVE_CLASS(xmp.PlugInError,xmp.PlugInNotFoundError);xmp.ServiceError=function(Sh,Th){xmp.ServiceError.ctor.call(this,"ServiceError",Sh,Th);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.ServiceError);xmp.UnsupportedPlatformError=function(Uh,Vh){xmp.UnsupportedPlatformError.ctor.call(this,xmp.XmpErrorCodes.FATAL_PLATFORM,"UnsupportedPlatformError",Uh,Vh);};xmp.DERIVE_CLASS(xmp.FatalException,xmp.UnsupportedPlatformError);xmp.DefaultPlaybackMode=function(Wh,Xh,Yh){xmp.DefaultPlaybackMode.ctor.call(this,Wh,Xh,Yh);};xmp.DERIVE_CLASS(xmp.PlaybackMode,xmp.DefaultPlaybackMode);xmp.DefaultPlaybackMode.prototype.open=function(Zh,$h){this.changeMode(Zh,xmp.READY,xmp.OPEN_OPERATION,$h);};xmp.DefaultPlaybackMode.prototype.close=function(ai){this.changeMode(ai,xmp.IDLE,xmp.CLOSE_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.play=function(bi){this.changeMode(bi,xmp.PLAY,xmp.PLAY_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.pause=function(ci){this.changeMode(ci,xmp.PAUSE,xmp.PAUSE_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.stop=function(di){this.changeMode(di,xmp.STOP,xmp.STOP_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.rewind=function(ei){this.changeMode(ei,xmp.REWIND,xmp.REWIND_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.fastForward=function(fi){this.changeMode(fi,xmp.FAST_FORWARD,xmp.FAST_FORWARD_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.seek=function(gi,hi){this.changeMode(gi,xmp.SEEKABLE,xmp.SEEK_OPERATION,hi);};xmp.DefaultPlaybackMode.prototype.ended=function(ii){this.changeMode(ii,xmp.ENDED,xmp.ENDED_OPERATION,null);};xmp.DefaultPlaybackMode.prototype.error=function(ji){this.changeMode(ji,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(ki,li,mi){this.ended(ki);};xmp.EndedPlaybackMode.prototype.ended=function(ni){try{this.getPlayer(ni).ended();}
catch(e){this.handleError(ni,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(oi,pi,qi){this.error(oi);};xmp.ErrorPlaybackMode.prototype.error=function(ri){try{this.getPlayer(ri).error();}
catch(e){this.handleError(ri,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(si,ti,ui){this.fastForward(si);};xmp.FastForwardPlaybackMode.prototype.fastForward=function(vi){try{this.getPlayer(vi).fastForward();}
catch(e){this.handleError(vi,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(wi,xi,yi){this.close(wi);};xmp.IdlePlaybackMode.prototype.close=function(zi){try{this.getPlayer(zi).close();}
catch(e){this.handleError(zi,xmp.CLOSE_OPERATION,e);}};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(Ai,Bi,Ci){this.play(Ai);};xmp.NormalPlaybackMode.prototype.play=function(Di){try{this.getPlayer(Di).play();}
catch(e){this.handleError(Di,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(Ei,Fi,Gi){this.pause(Ei);};xmp.PausePlaybackMode.prototype.pause=function(Hi){try{this.getPlayer(Hi).pause();}
catch(e){this.handleError(Hi,xmp.PAUSE_OPERATION,e);}};xmp.PlayerModeRegistry=function(){this.modes=[];var Ii=[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<Ii.length;i++){this.addMode(Ii[i]);}};xmp.PlayerModeRegistry.prototype.addMode=function(Ji){this.modes[Ji.type]=Ji;};xmp.PlayerModeRegistry.prototype.findMode=function(Ki){var Li=this.modes[Ki];if(Li!==null){return Li;}
throw new xmp.PlaybackModeError("Finding playback mode.","Unable to find player mode \""+Ki+"\".",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(Mi,Ni,Oi){this.open(Mi,Ni);};xmp.ReadyPlaybackMode.prototype.open=function(Pi,Qi){try{this.getPlayer(Pi).open(Qi);}
catch(e){this.handleError(Pi,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(Ri,Si,Ti){this.rewind(Ri);};xmp.RewindPlaybackMode.prototype.rewind=function(Ui){try{this.getPlayer(Ui).rewind();}
catch(e){this.handleError(Ui,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(Vi,Wi,Xi){this.seek(Vi,Wi);};xmp.SeekablePlaybackMode.prototype.seek=function(Yi,Zi){try{this.getPlayer(Yi).seek(Zi);}
catch(e){this.handleError(Yi,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($i,aj,bj){this.stop($i);};xmp.StopPlaybackMode.prototype.stop=function(cj){try{this.getPlayer(cj).stop();}
catch(e){this.handleError(cj,xmp.STOP_OPERATION,e);}};