a:41:{s:9:"#provides";s:16:"dojox.av.FLAudio";s:9:"#resource";s:13:"av/FLAudio.js";s:9:"#requires";a:4:{i:0;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}i:1;a:2:{i:0;s:6:"common";i:1;s:17:"dojox.embed.Flash";}i:2;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.av._Media";}i:3;a:2:{i:0;s:6:"common";i:1;s:20:"dojox.timing.doLater";}}s:16:"dojox.av.FLAudio";a:7:{s:4:"type";s:8:"Function";s:7:"summary";s:63:"Play MP3 files through the Flash SWF built in the DEFT project.";s:11:"description";s:557:"This class is brand new, so there is a lot of functionality not yet available. The initial purpose is for playing "event" sounds like button clicks, and for loading and controlling multiple sounds at once. As of yet, streaming is not supported and polling the sounds for events during playback may still be missing information. Markup is not supported, as it may not be needed. TODO: Streaming, playback events, crossdomain, CDN support, (alternate SWF location), global volume, ID3 tag, factor out doLater, onLoadStatus needs work, play(position) / seek()";s:8:"examples";a:1:{i:0;s:83:" new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay:false });";}s:10:"parameters";a:1:{s:7:"options";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:318:" dojo.mixin(this, options || {}); if(!this.id){ this.id = "flaudio_"+new Date().getTime(); } this.domNode = dojo.doc.createElement("div"); dojo.style(this.domNode, { postion:"relative", width:"1px", height:"1px", top:"1px", left:"1px" }); dojo.body().appendChild(this.domNode); this.init();";s:9:"classlike";b:1;}s:19:"dojox.av.FLAudio.id";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:6:"String";s:7:"summary";s:50:"The id of this widget and the id of the SWF movie.";s:8:"instance";s:16:"dojox.av.FLAudio";}s:30:"dojox.av.FLAudio.initialVolume";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:8:"instance";s:16:"dojox.av.FLAudio";s:4:"type";s:6:"Number";s:7:"summary";s:74:"From 0-1 Sets volume for all files unless changed with doPlay or setVolume";}s:27:"dojox.av.FLAudio.initialPan";a:3:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:6:"Number";s:7:"summary";s:219:"From -1 to 1 (-1 is left, 1 is right, 0 is middle) Sets pan for all files unless changed with play or setPan autoPlay: Boolean If true, all files will play upon load. If false, they load and wait for doPlay() command.";}s:24:"dojox.av.FLAudio.isDebug";a:3:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:7:"Boolean";s:7:"summary";s:64:"Setting to true tells the SWF to output log messages to Firebug.";}s:31:"dojox.av.FLAudio.statusInterval";a:3:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:6:"Number";s:7:"summary";s:87:"How often in milliseconds that the status of the player is checked - both load and play";}s:25:"dojox.av.FLAudio._swfPath";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:3:"Uri";s:7:"summary";s:280:"The path to the video player SWF resource ============== // Loading Files // ============== // ============================= // Methods to control the sound // ============================= // ============= // Sound Events // ============= //";s:7:"private";b:1;}s:21:"dojox.av.FLAudio.init";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:6:"source";s:1134:" this._subs = []; this.initialVolume = this._normalizeVolume(this.initialVolume); var args = { path:this._swfPath.uri, width:"1px", height:"1px", minimumVersion:9, // this may need to be 10, not sure expressInstall:true, params:{ wmode:"transparent" }, // only pass in simple variables - no deep objects vars:{ id:this.id, autoPlay:this.autoPlay, initialVolume:this.initialVolume, initialPan:this.initialPan, statusInterval:this.statusInterval, isDebug:this.isDebug } }; this._sub("mediaError", "onError"); this._sub("filesProgress", "onLoadStatus"); this._sub("filesAllLoaded", "onAllLoaded"); this._sub("mediaPosition", "onPlayStatus"); this._sub("mediaMeta", "onID3"); this._flashObject = new dojox.embed.Flash(args, this.domNode); this._flashObject.onError = function(err){ console.warn("Flash Error:", err); alert(err); }; this._flashObject.onLoad = dojo.hitch(this, function(mov){ this.flashMedia = mov; this.isPlaying = this.autoPlay; this.isStopped = !this.autoPlay; this.onLoad(this.flashMedia); });";s:7:"summary";s:21:"Initialize the media.";s:9:"classlike";b:1;}s:21:"dojox.av.FLAudio.load";a:7:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:229:"url: String (required) path to MP3 media url must be absolute or relative to SWF, not dojo or the html. An effort will be made to fix incorrect paths. id: String (optional) an identifier to later determine which media to control.";}}s:6:"source";s:295:" if(dojox.timing.doLater(this.flashMedia, this)){ return false; } if(!options.url){ throw new Error("An url is required for loading media"); return false; }else{ options.url = this._normalizeUrl(options.url); } this.flashMedia.load(options); return options.url; // String";s:7:"summary";s:91:"Adds a media object to the playlist ***This can be called repeatedly to add multiple items.";s:14:"return_summary";s:60:"The normalized url, which can be used to identify the audio.";s:7:"returns";s:6:"String";}s:23:"dojox.av.FLAudio.doPlay";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:385:"volume: Number Sets the volume pan: Number Sets left/right pan index:Number OR id:String OR url:String Choose one of the above to indentify the media you wish to control. id is set by you. index is the order in which media was added (zero based) NOTE: lack of an identifier will default to first (or only) item. NOTE: Can't name this method "play()" as it causes an IE error.";}}s:6:"source";s:34:" this.flashMedia.doPlay(options);";s:7:"summary";s:48:"Tell media to play, based on the options passed.";}s:22:"dojox.av.FLAudio.pause";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:52:"index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:33:" this.flashMedia.pause(options);";s:7:"summary";s:63:"Tell media to pause, based on identifier in the options passed.";}s:21:"dojox.av.FLAudio.stop";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:52:"index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:34:" this.flashMedia.doStop(options);";s:7:"summary";s:62:"Tell media to stop, based on identifier in the options passed.";}s:26:"dojox.av.FLAudio.setVolume";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:74:"volume: Number 0 to 1 index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:37:" this.flashMedia.setVolume(options);";s:7:"summary";s:60:"Set media volume, based on identifier in the options passed.";}s:23:"dojox.av.FLAudio.setPan";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:71:"pan:Number -1 to 1 index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:34:" this.flashMedia.setPan(options);";s:7:"summary";s:57:"Set media pan, based on identifier in the options passed.";}s:26:"dojox.av.FLAudio.getVolume";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:52:"index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:44:" return this.flashMedia.getVolume(options);";s:7:"summary";s:60:"Get media volume, based on identifier in the options passed.";}s:23:"dojox.av.FLAudio.getPan";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"options";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:52:"index:Number OR id:String OR url:String See doPlay()";}}s:6:"source";s:41:" return this.flashMedia.getPan(options);";s:7:"summary";s:57:"Set media pan, based on identifier in the options passed.";}s:24:"dojox.av.FLAudio.onError";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"msg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:33:" console.warn("SWF ERROR:", msg)";s:7:"summary";s:31:"stub fired when an error occurs";}s:29:"dojox.av.FLAudio.onLoadStatus";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"events";a:1:{s:4:"type";s:5:"Array";}}s:6:"source";s:13:" // summary:";s:7:"summary";s:0:"";}s:28:"dojox.av.FLAudio.onAllLoaded";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:6:"source";s:30:" // summary: // stub fired";s:7:"summary";s:10:"stub fired";}s:29:"dojox.av.FLAudio.onPlayStatus";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"events";a:1:{s:4:"type";s:5:"Array";}}s:6:"source";s:13:" // summary:";s:7:"summary";s:0:"";}s:23:"dojox.av.FLAudio.onLoad";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:6:"source";s:48:" // summary: // stub fired when SWF is ready";s:7:"summary";s:28:"stub fired when SWF is ready";}s:22:"dojox.av.FLAudio.onID3";a:5:{s:9:"prototype";s:16:"dojox.av.FLAudio";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"evt";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:56:" // summary: // Fired when the ID3 data is received.";s:7:"summary";s:36:"Fired when the ID3 data is received.";}s:24:"dojox.av.FLAudio.destroy";a:4:{s:9:"prototype";s:16:"dojox.av.FLAudio";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:21:"dojox.av.FLAudio._sub";a:6:{s:9:"prototype";s:16:"dojox.av.FLAudio";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:33:"dojox.av.FLAudio._normalizeVolume";a:6:{s:9:"prototype";s:16:"dojox.av.FLAudio";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:30:"dojox.av.FLAudio._normalizeUrl";a:6:{s:9:"prototype";s:16:"dojox.av.FLAudio";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:22:"dojox.av.FLAudio._subs";a:3:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"private";b:1;s:7:"summary";s:0:"";}s:29:"dojox.av.FLAudio._flashObject";a:3:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.av.FLAudio._flashObject.onError";a:3:{s:8:"instance";s:16:"dojox.av.FLAudio";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.av.FLAudio._flashObject.onLoad";a:3:{s:8:"instance";s:16:"dojox.av.FLAudio";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:27:"dojox.av.FLAudio.flashMedia";a:2:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"summary";s:0:"";}s:26:"dojox.av.FLAudio.isPlaying";a:2:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"summary";s:0:"";}s:26:"dojox.av.FLAudio.isStopped";a:2:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"summary";s:0:"";}s:42:"dojox.av.FLAudio.init._flashObject.onError";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"err";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:52:" console.warn("Flash Error:", err); alert(err);";s:8:"instance";s:21:"dojox.av.FLAudio.init";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:24:"dojox.av.FLAudio.domNode";a:2:{s:8:"instance";s:16:"dojox.av.FLAudio";s:7:"summary";s:0:"";}s:4:"this";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:13:"options || {}";}}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:"";}}