Skip to content

Commit

Permalink
Logged deprecated calls to the console.
Browse files Browse the repository at this point in the history
Signed-off-by: Lanny McNie <[email protected]>
  • Loading branch information
Lanny McNie committed Dec 12, 2013
1 parent 995942e commit cae4592
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
14 changes: 8 additions & 6 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
Version NEXT [Not Released]
************************************************************************************************************************
- updated tutorials for changes in this build
- fixed a bug with default SoundInstance, it did not have playFailed function that is called by Sound
- updates and fixes to all docs
- added {"AllowScriptAccess" : "always"} to swfObject for FlashPlugin
- all Sound, WebAudioPlugin, HTMLAudioPlugin, FlashPlugin, and SoundInstance internal properties and methods renamed to
start with _ (underscore)
- fix a bug that prevented interrupt value from being read in play call if it was passed in an object
- deprecated registerPlugin in favor of registerPlugins with a single argument
- fixed a bug with default SoundInstance, it did not have playFailed function that is called by Sound
- fixed a bug that prevented interrupt value from being read in play call if it was passed in an object
- changed SoundInstance to extend createjs.EventDispatcher rather than mix in
- deprecated FlashPlugin BASE_PATH in favor swfPath
- alterations to basePath approach that require full src (basePath + src) in create and play calls
- include basePath in removeSound and removeManifest, which is now required of it was included in loading
- include basePath in removeSound and removeManifest, which is now required if it was included in loading
- introduced createjs.Sound.alternateExtensions, which is replacing a delimited list as a means to load alternate
file types
- deprecated "|" approach to alternate files, in favor of class level alternateExtensions approach
- added willTrigger method to EventDispatcher
- deprecated registerPlugin in favor of registerPlugins with a single argument
- deprecated FlashPlugin BASE_PATH in favor swfPath
- added console logs deprecated calls above are used
- added willTrigger() method to EventDispatcher


Version 0.5.1 [November 15, 2013]
Expand Down Expand Up @@ -166,4 +167,5 @@ sound is played, providing a much easier way to control audio once it has starte

Version 0.1.0
****************************************************************************************************
Initial release.******************************************************************
Initial release.
7 changes: 7 additions & 0 deletions src/soundjs/FlashPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ this.createjs = this.createjs || {};
w.appendChild(c);

// Embed SWF
if (s.BASE_PATH) {
try {
console.log("createjs.FlashPlugin.BASE_PATH has been deprecated, please use swfPath");
} catch (err) {
// you are in IE with the console closed, you monster
}
}
var path = s.BASE_PATH || s.swfPath; // BASE_PATH defaults to null, so it will only give value if set by user
var val = swfobject.embedSWF(path + "FlashAudioPlugin.swf", this._CONTAINER_ID, "1", "1",
"9.0.0", null, null, {"AllowScriptAccess" : "always"}, null,
Expand Down
14 changes: 13 additions & 1 deletion src/soundjs/Sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ this.createjs = this.createjs || {};
* <b>iOS 6 Web Audio limitations</b><br />
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event
* (touch/click).</li>
* <li>A bug exists that will distort un-cached web audio when a video element is present in the DOM.</li>
* <li>A bug exists that will distort un-cached web audio when a video element is present in the DOM that has audio at a different sampleRate.</li>
* <li>Note HTMLAudioPlugin is not supported on iOS by default. See {{#crossLink "HTMLAudioPlugin"}}{{/crossLink}}
* for more details.</li>
* </ul>
Expand Down Expand Up @@ -558,6 +558,11 @@ this.createjs = this.createjs || {};
* @deprecated
*/
s.registerPlugin = function (plugin) {
try {
console.log("createjs.Sound.registerPlugin has been deprecated. Please use registerPlugins.");
} catch (err) {
// you are in IE with the console closed, you monster
}
return s._registerPlugin(plugin);
};

Expand Down Expand Up @@ -1037,6 +1042,13 @@ this.createjs = this.createjs || {};
s._parsePath = function (value, type, id, data) {
if (typeof(value) != "string") {value = value.toString();}
var sounds = value.split(s.DELIMITER);
if (sounds.length > 1) {
try {
console.log("createjs.Sound.DELIMITER \"|\" loading approach has been deprecated. Please use the new alternateExtensions property.");
} catch (err) {
// you are in IE with the console closed, you monster
}
}
var ret = {type:type || "sound", id:id, data:data};
var c = s.getCapabilities();
for (var i = 0, l = sounds.length; i < l; i++) {
Expand Down
3 changes: 2 additions & 1 deletion src/soundjs/WebAudioPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ this.createjs = this.createjs || {};
* <br />
* <b>iOS 6 limitations</b>
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event (touch/click).</li>
* <li>A bug exists that will distort uncached audio when a video element is present in the DOM.</li>
* <li>A bug exists that will distort uncached audio when a video element is present in the DOM. You can avoid this bug
* by ensuring the audio and video audio share the same sampleRate.</li>
* </ul>
* @class WebAudioPlugin
* @constructor
Expand Down

0 comments on commit cae4592

Please sign in to comment.