a:45:{s:9:"#provides";s:15:"dojox.av._Media";s:9:"#resource";s:12:"av/_Media.js";s:15:"dojox.av._Media";a:4:{s:4:"type";s:8:"Function";s:7:"summary";s:39:"Used as a mixin for dojox and AIR media";s:11:"description";s:84:"Calculates the current status of the playing media and fires the appropriate events.";s:9:"classlike";b:1;}s:24:"dojox.av._Media.mediaUrl";a:2:{s:9:"prototype";s:15:"dojox.av._Media";s:7:"summary";s:0:"";}s:29:"dojox.av._Media.initialVolume";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:5:"Float";s:7:"summary";s:67:"The initial volume setting of the player. Acccepts between 0 and 1.";}s:24:"dojox.av._Media.autoPlay";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:7:"Boolean";s:7:"summary";s:53:"Whether the video automatically plays on load or not.";}s:26:"dojox.av._Media.bufferTime";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:6:"Number";s:7:"summary";s:193:"Time in milliseconds that the video should be loaded before it will play. May pause and resume to build up buffer. Prevents stuttering. Note: Older FLVs, without a duration, cannot be buffered.";}s:29:"dojox.av._Media.minBufferTime";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:6:"Number";s:7:"summary";s:226:"Time in milliseconds bwteen the playhead time and loaded time that will trigger the buffer. When buffer is triggered, video will pause until the bufferTime amount is buffered. Note: Should be a small number, greater than zero.";}s:26:"dojox.av._Media.updateTime";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:6:"Number";s:7:"summary";s:66:"How often, in milliseconds to get an update of the video position.";}s:18:"dojox.av._Media.id";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:6:"String";s:7:"summary";s:50:"The id of this widget and the id of the SWF movie.";}s:23:"dojox.av._Media.isDebug";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:7:"Boolean";s:7:"summary";s:64:"Setting to true tells the SWF to output log messages to Firebug.";}s:33:"dojox.av._Media.percentDownloaded";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:16:"read-only-Number";s:7:"summary";s:51:"The percentage the media has downloaded; from 0-100";}s:28:"dojox.av._Media._flashObject";a:4:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:16:"read-only-Object";s:7:"summary";s:22:"The dojox.embed object";s:7:"private";b:1;}s:26:"dojox.av._Media.flashMedia";a:3:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:13:"read-only-SWF";s:7:"summary";s:161:"The SWF object. Methods are passed to this. ============== // Player Getters // ============== // ============= // Player Events // ============= //";}s:27:"dojox.av._Media._initStatus";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:83:" this.status = "ready"; dojo.connect(this, "onPosition", this, "_figureStatus");";s:7:"summary";s:33:"Connect mediaStatus to the media.";s:7:"private";b:1;}s:23:"dojox.av._Media.getTime";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:44:" return this.flashMedia.getTime(); // Float";s:7:"summary";s:168:"Returns the current time of the video Note: Consider the onPosition event, which returns the time at a set interval. Too many trips to the SWF could impact performance.";s:7:"returns";s:5:"Float";}s:22:"dojox.av._Media.onLoad";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"mov";a:1:{s:4:"type";s:3:"SWF";}}s:6:"source";s:99:" // summary: // Fired when the SWF player has loaded // NOT when the video has loaded //";s:7:"summary";s:66:"Fired when the SWF player has loaded NOT when the video has loaded";}s:28:"dojox.av._Media.onDownloaded";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"percent";a:1:{s:4:"type";s:6:"Number";}}s:6:"source";s:96:" // summary: // Fires the amount of that the media has been // downloaded. Number, 0-100";s:7:"summary";s:69:"Fires the amount of that the media has been downloaded. Number, 0-100";}s:23:"dojox.av._Media.onClick";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"evt";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:198:" // summary: // TODO: Return x/y of click // Fires when the player is clicked // Could be used to toggle play/pause, or // do an external activity, like opening a new // window.";s:7:"summary";s:149:"TODO: Return x/y of click Fires when the player is clicked Could be used to toggle play/pause, or do an external activity, like opening a new window.";}s:26:"dojox.av._Media.onSwfSized";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:88:" // summary: // Fired on SWF resize, or when its // toggled between fullscreen.";s:7:"summary";s:60:"Fired on SWF resize, or when its toggled between fullscreen.";}s:26:"dojox.av._Media.onMetaData";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}s:3:"evt";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:32:" this.duration = data.duration;";s:7:"summary";s:312:"The video properties. Width, height, duration, etc. NOTE: if data is empty, this is an older FLV with no meta data. Duration cannot be determined. In original FLVs, duration could only be obtained with Flash Media Server. NOTE: Older FLVs can still return width and height and will do so on a second event call";}s:26:"dojox.av._Media.onPosition";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"time";a:1:{s:4:"type";s:5:"Float";}}s:6:"source";s:60:" // summary: // The position of the playhead in seconds ";s:7:"summary";s:39:"The position of the playhead in seconds";}s:23:"dojox.av._Media.onStart";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:131:" // summary: // Fires when video starts // Good for setting the play button to pause // during an autoPlay for example";s:7:"summary";s:96:"Fires when video starts Good for setting the play button to pause during an autoPlay for example";}s:22:"dojox.av._Media.onPlay";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:56:" // summary: // Fires when video starts and resumes";s:7:"summary";s:35:"Fires when video starts and resumes";}s:23:"dojox.av._Media.onPause";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:59:" // summary: // Fires when the pause button is clicked";s:7:"summary";s:38:"Fires when the pause button is clicked";}s:21:"dojox.av._Media.onEnd";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:144:" // summary: // Fires when video ends // Could be used to change pause button to play // or show a post video graphic, like YouTube";s:7:"summary";s:109:"Fires when video ends Could be used to change pause button to play or show a post video graphic, like YouTube";}s:22:"dojox.av._Media.onStop";a:4:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:120:" // summary: // Fire when the Stop button is clicked // TODO: This is not hooked up yet and shouldn't // fire.";s:7:"summary";s:89:"Fire when the Stop button is clicked TODO: This is not hooked up yet and shouldn't fire.";}s:24:"dojox.av._Media.onBuffer";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"isBuffering";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:33:" this.isBuffering = isBuffering;";s:7:"summary";s:85:"Fires a boolean to tell if media is paused for buffering or if buffering has finished";}s:23:"dojox.av._Media.onError";a:6:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}s:3:"url";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:85:" console.warn("ERROR-"+data.type.toUpperCase()+":", data.info.code, " - URL:", url);";s:7:"summary";s:41:"Fired when the player encounters an error";s:8:"examples";a:1:{i:0;s:88:" console.warn("ERROR-"+data.type.toUpperCase()+":", data.info.code, " - URL:", url);";}}s:24:"dojox.av._Media.onStatus";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:34:" // summary: // Simple status";s:7:"summary";s:13:"Simple status";}s:30:"dojox.av._Media.onPlayerStatus";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:97:" // summary: // The status of the video from the SWF // playing, stopped, bufering, etc.";s:7:"summary";s:69:"The status of the video from the SWF playing, stopped, bufering, etc.";}s:24:"dojox.av._Media.onResize";a:4:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:0:"";s:7:"summary";s:0:"";}s:29:"dojox.av._Media._figureStatus";a:5:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:1659:" var pos = this.getTime(); //console.log(pos, this.duration, (pos>this.duration-.5), (this.duration && pos>this.duration-.5)) if(this.status=="stopping"){ // stop was fired, need to fake pos==0 this.status = "stopped"; this.onStop(this._eventFactory()); }else if(this.status=="ending" && pos==this._prevPos){ this.status = "ended"; this.onEnd(this._eventFactory()); }else if(this.duration && pos>this.duration-.5){ this.status="ending" }else if(pos===0 ){//|| this.status == "stopped" if(this.status == "ready"){ //never played }else{ //stopped this.status = "stopped"; if(this._prevStatus != "stopped"){ this.onStop(this._eventFactory()); } } }else{ // pos > 0 if(this.status == "ready"){ //started this.status = "started"; this.onStart(this._eventFactory()); this.onPlay(this._eventFactory()); }else if(this.isBuffering){ this.status = "buffering"; }else if(this.status == "started" || (this.status == "playing" && pos != this._prevPos)){ this.status = "playing"; //this.onPosition(this._eventFactory()); }else if(!this.isStopped && this.status == "playing" && pos == this._prevPos){ this.status = "paused"; console.warn("pause", pos, this._prevPos) if(this.status != this._prevStatus){ this.onPause(this._eventFactory()); } }else if((this.status == "paused" ||this.status == "stopped") && pos != this._prevPos){ this.status = "started"; this.onPlay(this._eventFactory()); } } this._prevPos = pos; this._prevStatus = this.status; this.onStatus(this.status);";s:7:"summary";s:151:"Calculate media status, based on playhead movement, and onStop and onStart events TODO: Figure in real status from the media for more accurate results.";s:7:"private";b:1;}s:29:"dojox.av._Media._eventFactory";a:6:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:198:" var evt = { //position:this._channel.position, //seconds:this.toSeconds(this._channel.position*.001), //percentPlayed:this._getPercent(), status:this.status } return evt; // Object";s:7:"summary";s:31:"Creates a generic event object.";s:7:"returns";s:6:"Object";s:7:"private";b:1;}s:20:"dojox.av._Media._sub";a:6:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"topic";a:1:{s:4:"type";s:0:"";}s:6:"method";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:50:" dojo.subscribe(this.id+"/"+topic, this, method);";s:7:"summary";s:32:"helper for subscribing to topics";s:7:"private";b:1;}s:32:"dojox.av._Media._normalizeVolume";a:6:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"vol";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:65:" if(vol>1){ while(vol>1){ vol*=.1 } } return vol;";s:7:"summary";s:31:"Ensures volume is less than one";s:7:"private";b:1;}s:29:"dojox.av._Media._normalizeUrl";a:6:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"_url";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:303:" if(_url && _url.toLowerCase().indexOf("http")<0){ // // Appears to be a relative path. Attempt to convert it to absolute, // so it will better target the SWF. var loc = window.location.href.split("/"); loc.pop(); loc = loc.join("/")+"/"; _url = loc+_url; } return _url;";s:7:"summary";s:78:"Checks that path is relative to HTML file or convertes it to an absolute path.";s:7:"private";b:1;}s:23:"dojox.av._Media.destroy";a:4:{s:9:"prototype";s:15:"dojox.av._Media";s:4:"type";s:8:"Function";s:6:"source";s:337:" if(!this.flashMedia){ this._cons.push(dojo.connect(this, "onLoad", this, "destroy")); return; } dojo.forEach(this._subs, function(s){ dojo.unsubscribe(s); }); dojo.forEach(this._cons, function(c){ dojo.disconnect(c); }); this._flashObject.destroy(); //dojo._destroyElement(this.flashDiv);";s:7:"summary";s:14:"destroys flash";}s:22:"dojox.av._Media.status";a:2:{s:8:"instance";s:15:"dojox.av._Media";s:7:"summary";s:0:"";}s:24:"dojox.av._Media.duration";a:2:{s:8:"instance";s:15:"dojox.av._Media";s:7:"summary";s:0:"";}s:27:"dojox.av._Media.isBuffering";a:2:{s:8:"instance";s:15:"dojox.av._Media";s:7:"summary";s:0:"";}s:24:"dojox.av._Media._prevPos";a:3:{s:8:"instance";s:15:"dojox.av._Media";s:7:"private";b:1;s:7:"summary";s:0:"";}s:27:"dojox.av._Media._prevStatus";a:3:{s:8:"instance";s:15:"dojox.av._Media";s:7:"private";b:1;s:7:"summary";s:0:"";}s:8:"dojox.av";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}