Skip to content

Commit cae4592

Browse files
author
Lanny McNie
committed
Logged deprecated calls to the console.
Signed-off-by: Lanny McNie <[email protected]>
1 parent 995942e commit cae4592

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

VERSIONS.txt

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
Version NEXT [Not Released]
22
************************************************************************************************************************
33
- updated tutorials for changes in this build
4-
- fixed a bug with default SoundInstance, it did not have playFailed function that is called by Sound
54
- updates and fixes to all docs
65
- added {"AllowScriptAccess" : "always"} to swfObject for FlashPlugin
76
- all Sound, WebAudioPlugin, HTMLAudioPlugin, FlashPlugin, and SoundInstance internal properties and methods renamed to
87
start with _ (underscore)
9-
- fix a bug that prevented interrupt value from being read in play call if it was passed in an object
10-
- deprecated registerPlugin in favor of registerPlugins with a single argument
8+
- fixed a bug with default SoundInstance, it did not have playFailed function that is called by Sound
9+
- fixed a bug that prevented interrupt value from being read in play call if it was passed in an object
1110
- changed SoundInstance to extend createjs.EventDispatcher rather than mix in
12-
- deprecated FlashPlugin BASE_PATH in favor swfPath
1311
- alterations to basePath approach that require full src (basePath + src) in create and play calls
14-
- include basePath in removeSound and removeManifest, which is now required of it was included in loading
12+
- include basePath in removeSound and removeManifest, which is now required if it was included in loading
1513
- introduced createjs.Sound.alternateExtensions, which is replacing a delimited list as a means to load alternate
1614
file types
1715
- deprecated "|" approach to alternate files, in favor of class level alternateExtensions approach
18-
- added willTrigger method to EventDispatcher
16+
- deprecated registerPlugin in favor of registerPlugins with a single argument
17+
- deprecated FlashPlugin BASE_PATH in favor swfPath
18+
- added console logs deprecated calls above are used
19+
- added willTrigger() method to EventDispatcher
1920

2021

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

167168
Version 0.1.0
168169
****************************************************************************************************
170+
Initial release.******************************************************************
169171
Initial release.

src/soundjs/FlashPlugin.js

+7
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,13 @@ this.createjs = this.createjs || {};
298298
w.appendChild(c);
299299

300300
// Embed SWF
301+
if (s.BASE_PATH) {
302+
try {
303+
console.log("createjs.FlashPlugin.BASE_PATH has been deprecated, please use swfPath");
304+
} catch (err) {
305+
// you are in IE with the console closed, you monster
306+
}
307+
}
301308
var path = s.BASE_PATH || s.swfPath; // BASE_PATH defaults to null, so it will only give value if set by user
302309
var val = swfobject.embedSWF(path + "FlashAudioPlugin.swf", this._CONTAINER_ID, "1", "1",
303310
"9.0.0", null, null, {"AllowScriptAccess" : "always"}, null,

src/soundjs/Sound.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ this.createjs = this.createjs || {};
165165
* <b>iOS 6 Web Audio limitations</b><br />
166166
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event
167167
* (touch/click).</li>
168-
* <li>A bug exists that will distort un-cached web audio when a video element is present in the DOM.</li>
168+
* <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>
169169
* <li>Note HTMLAudioPlugin is not supported on iOS by default. See {{#crossLink "HTMLAudioPlugin"}}{{/crossLink}}
170170
* for more details.</li>
171171
* </ul>
@@ -558,6 +558,11 @@ this.createjs = this.createjs || {};
558558
* @deprecated
559559
*/
560560
s.registerPlugin = function (plugin) {
561+
try {
562+
console.log("createjs.Sound.registerPlugin has been deprecated. Please use registerPlugins.");
563+
} catch (err) {
564+
// you are in IE with the console closed, you monster
565+
}
561566
return s._registerPlugin(plugin);
562567
};
563568

@@ -1037,6 +1042,13 @@ this.createjs = this.createjs || {};
10371042
s._parsePath = function (value, type, id, data) {
10381043
if (typeof(value) != "string") {value = value.toString();}
10391044
var sounds = value.split(s.DELIMITER);
1045+
if (sounds.length > 1) {
1046+
try {
1047+
console.log("createjs.Sound.DELIMITER \"|\" loading approach has been deprecated. Please use the new alternateExtensions property.");
1048+
} catch (err) {
1049+
// you are in IE with the console closed, you monster
1050+
}
1051+
}
10401052
var ret = {type:type || "sound", id:id, data:data};
10411053
var c = s.getCapabilities();
10421054
for (var i = 0, l = sounds.length; i < l; i++) {

src/soundjs/WebAudioPlugin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ this.createjs = this.createjs || {};
5555
* <br />
5656
* <b>iOS 6 limitations</b>
5757
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event (touch/click).</li>
58-
* <li>A bug exists that will distort uncached audio when a video element is present in the DOM.</li>
58+
* <li>A bug exists that will distort uncached audio when a video element is present in the DOM. You can avoid this bug
59+
* by ensuring the audio and video audio share the same sampleRate.</li>
5960
* </ul>
6061
* @class WebAudioPlugin
6162
* @constructor

0 commit comments

Comments
 (0)