Skip to content

Commit 72a6bbe

Browse files
author
Lanny McNie
committed
Merge branch 'master' into GMC_0.6.2
2 parents 47ac41a + f06c4e6 commit 72a6bbe

File tree

12 files changed

+213
-97
lines changed

12 files changed

+213
-97
lines changed

VERSIONS.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ CRITICAL
1212
- added automatic "playEmptySound" support on iOS to unlock the WebAudio context
1313

1414

15+
Version 0.6.1-HOTFIX [October 8, 2015]
16+
****************************************************************************************************
17+
- fixed issue with panning in Chrome, caused by an unset pan value in WebAudio. This minor fix is
18+
provided to fix existing content online that was broken with a browser update.
19+
20+
1521
Version 0.6.1 [May 21,2015]
1622
****************************************************************************************************
1723
CRITICAL (may break existing content):

build/Gruntfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ module.exports = function (grunt) {
336336
"updateversion", "combine", "uglify", "clearversion", "copy:src"
337337
]);
338338

339+
/** Aliased task for WebStorm quick-run */
340+
grunt.registerTask('_next_sound', ["next"]);
341+
339342
/**
340343
* Task for exporting a release build (version based on package.json)
341344
*

build/createjsTheme/assets/scss/elements/tags.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ h2 {
163163

164164
h3 {
165165
@extend h1;
166-
font-size: $fontSize-smaller;
166+
font-size: $fontSize-small;
167167
font-weight: 700;
168168
text-transform: none;
169169
}

docs/soundjs_docs-NEXT.zip

1.83 KB
Binary file not shown.

lib/README.txt

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
# lib directory
2-
This directory contains a compressed version of the SoundJS library, including the most recent tagged release and the in-progress NEXT release.
2+
This directory contains a compressed version of the SoundJS library, including the most recent tagged release and the
3+
in-progress NEXT release.
34

4-
Both combined and minified versions of the library are included. The former being useful for debugging, and the latter for deployment.
5+
Both combined and minified versions of the library are included. The former being useful for debugging, and the latter
6+
for deployment.
57

6-
You can also link to the libraries on the [CreateJS CDN](http://code.createjs.com/), to benefit from faster load times and shared caching across sites.
8+
You can also link to the libraries on the [CreateJS CDN](http://code.createjs.com/), to benefit from faster load times
9+
and shared caching across sites.
710

811
# libraries
9-
**soundjs-VERSION.min.js** contains minified versions of all of the SoundJS classes (comments and white space stripped) except the contents of soundjs/flashaudio/
10-
11-
**flashaudioplugin-VERSION.min.js** contains a minified version of FlashAudio support. This class is used to support older browsers.
12+
**soundjs-VERSION.min.js** contains minified versions of all of the SoundJS classes (comments and white space stripped)
13+
except for the Flash and Cordova audio plugins.
14+
**flashaudioplugin-VERSION.min.js** contains minified versions of the Flash audio plugin.
15+
**cordovaaudioplugin-VERSION.min.js** contains minified versions of the Cordova audio plugin.
16+
**soundjs-VERSION.combined.js** contains all the SoundJS classes (except Flash and Cordova plugin classes) including
17+
whitespace and comments.
18+
**flashaudioplugin-VERSION.combined.js** contains all the Flash audio plugin classes.
19+
**cordovaaudioplugin-VERSION.combined.js** contains all the Cordova audio plugin classes.
1220

1321

1422
# license
15-
The libraries are ©2010 gskinner.com, inc., and made available under the highly permissive MIT open source software license. See the source file header for the full license text.
23+
The libraries are ©2010 gskinner.com, inc., and made available under the highly permissive MIT open source software
24+
license. See the source file header for the full license text.

lib/soundjs-0.6.1.combined.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6473,6 +6473,7 @@ this.createjs = this.createjs || {};
64736473
this.panNode = s.context.createPanner();
64746474
this.panNode.panningModel = s._panningModel;
64756475
this.panNode.connect(this.gainNode);
6476+
this._updatePan();
64766477

64776478
/**
64786479
* NOTE this is only intended for use by advanced users.

lib/soundjs-0.6.1.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/soundjs-NEXT.combined.js

Lines changed: 105 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
/*!
2+
* SoundJS
3+
* Visit http://createjs.com/ for documentation, updates and examples.
4+
*
5+
* Copyright (c) 2010 gskinner.com, inc.
6+
*
7+
* Permission is hereby granted, free of charge, to any person
8+
* obtaining a copy of this software and associated documentation
9+
* files (the "Software"), to deal in the Software without
10+
* restriction, including without limitation the rights to use,
11+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the
13+
* Software is furnished to do so, subject to the following
14+
* conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be
17+
* included in all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26+
* OTHER DEALINGS IN THE SOFTWARE.
27+
*/
128

229

330
//##############################################################################
@@ -30,7 +57,7 @@ this.createjs = this.createjs || {};
3057
* @type String
3158
* @static
3259
**/
33-
s.buildDate = /*=date*/"Thu, 01 Oct 2015 22:42:18 GMT"; // injected by build process
60+
s.buildDate = /*=date*/"Thu, 29 Oct 2015 03:02:56 GMT"; // injected by build process
3461

3562
})();
3663

@@ -3409,12 +3436,12 @@ this.createjs = this.createjs || {};
34093436
* createjs.FlashAudioPlugin.swfPath = "../src/soundjs/flashaudio";
34103437
* createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.FlashAudioPlugin]);
34113438
* createjs.Sound.alternateExtensions = ["mp3"];
3412-
* createjs.Sound.on("fileload", createjs.proxy(this.loadHandler, (this)));
3439+
* createjs.Sound.on("fileload", this.loadHandler, this);
34133440
* createjs.Sound.registerSound("path/to/mySound.ogg", "sound");
34143441
* function loadHandler(event) {
34153442
* // This is fired for each sound that is registered.
34163443
* var instance = createjs.Sound.play("sound"); // play using id. Could also use full source path or event.src.
3417-
* instance.on("complete", createjs.proxy(this.handleComplete, this));
3444+
* instance.on("complete", this.handleComplete, this);
34183445
* instance.volume = 0.5;
34193446
* }
34203447
*
@@ -3427,9 +3454,9 @@ this.createjs = this.createjs || {};
34273454
*
34283455
* Sound can be used as a plugin with PreloadJS to help preload audio properly. Audio preloaded with PreloadJS is
34293456
* automatically registered with the Sound class. When audio is not preloaded, Sound will do an automatic internal
3430-
* load. As a result, it may fail to play the first time play is called if the audio is not finished loading. Use the
3431-
* {{#crossLink "Sound/fileload"}}{{/crossLink}} event to determine when a sound has finished internally preloading.
3432-
* It is recommended that all audio is preloaded before it is played.
3457+
* load. As a result, it may fail to play the first time play is called if the audio is not finished loading. Use
3458+
* the {{#crossLink "Sound/fileload:event"}}{{/crossLink}} event to determine when a sound has finished internally
3459+
* preloading. It is recommended that all audio is preloaded before it is played.
34333460
*
34343461
* var queue = new createjs.LoadQueue();
34353462
* queue.installPlugin(createjs.Sound);
@@ -3457,28 +3484,47 @@ this.createjs = this.createjs || {};
34573484
* // after load is complete
34583485
* createjs.Sound.play("sound2");
34593486
*
3460-
* <b>Mobile Safe Approach</b><br />
3461-
* Mobile devices require sounds to be played inside of a user initiated event (touch/click) in varying degrees.
3462-
* As of SoundJS 0.4.1, you can launch a site inside of a user initiated event and have audio playback work. To
3463-
* enable as broadly as possible, the site needs to setup the Sound plugin in its initialization (for example via
3464-
* <code>createjs.Sound.initializeDefaultPlugins();</code>), and all sounds need to be played in the scope of the
3465-
* application. See the MobileSafe demo for a working example.
3466-
*
3467-
* <h4>Example</h4>
3487+
* <b>Mobile Playback</b><br />
3488+
* Devices running iOS require the WebAudio context to be "unlocked" by playing at least one sound inside of a user-
3489+
* initiated event (such as touch/click). Earlier versions of SoundJS included a "MobileSafe" sample, but this is no
3490+
* longer necessary as of SoundJS 0.6.2.
3491+
* <ul>
3492+
* <li>
3493+
* In SoundJS 0.4.1 and above, you can either initialize plugins or use the {{#crossLink "WebAudioPlugin/playEmptySound"}}{{/crossLink}}
3494+
* method in the call stack of a user input event to manually unlock the audio context.
3495+
* </li>
3496+
* <li>
3497+
* In SoundJS 0.6.2 and above, SoundJS will automatically listen for the first document-level "mousedown"
3498+
* and "touchend" event, and unlock WebAudio. This will continue to check these events until the WebAudio
3499+
* context becomes "unlocked" (changes from "suspended" to "running")
3500+
* </li>
3501+
* <li>
3502+
* Both the "mousedown" and "touchend" events can be used to unlock audio in iOS9+, the "touchstart" event
3503+
* will work in iOS8 and below. The "touchend" event will only work in iOS9 when the gesture is interpreted
3504+
* as a "click", so if the user long-presses the button, it will no longer work.
3505+
* </li>
3506+
* <li>
3507+
* When using the <a href="http://www.createjs.com/docs/easeljs/classes/Touch.html">EaselJS Touch class</a>,
3508+
* the "mousedown" event will not fire when a canvas is clicked, since MouseEvents are prevented, to ensure
3509+
* only touch events fire. To get around this, you can either rely on "touchend", or:
3510+
* <ol>
3511+
* <li>Set the `allowDefault` property on the Touch class constructor to `true` (defaults to `false`).</li>
3512+
* <li>Set the `preventSelection` property on the EaselJS `Stage` to `false`.</li>
3513+
* </ol>
3514+
* These settings may change how your application behaves, and are not recommended.
3515+
* </li>
3516+
* </ul>
34683517
*
3469-
* document.getElementById("status").addEventListener("click", handleTouch, false); // works on Android and iPad
3470-
* function handleTouch(event) {
3471-
* document.getElementById("status").removeEventListener("click", handleTouch, false); // remove the listener
3472-
* var thisApp = new myNameSpace.MyApp(); // launch the app
3473-
* }
3518+
* <b>Loading Alternate Paths and Extension-less Files</b><br />
3519+
* SoundJS supports loading alternate paths and extension-less files by passing an object instead of a string for
3520+
* the `src` property, which is a hash using the format `{extension:"path", extension2:"path2"}`. These labels are
3521+
* how SoundJS determines if the browser will support the sound. This also enables multiple formats to live in
3522+
* different folders, or on CDNs, which often has completely different filenames for each file.
34743523
*
3475-
* <b>Loading Alternate Paths and Extensionless Files</b><br />
3476-
* SoundJS supports loading alternate paths and extensionless files by passing an object for src that has various paths
3477-
* with property labels matching the extension. These labels are how SoundJS determines if the browser will support the sound.
34783524
* Priority is determined by the property order (first property is tried first). This is supported by both internal loading
34793525
* and loading with PreloadJS.
34803526
*
3481-
* Note an id is required for playback.
3527+
* <em>Note: an id is required for playback.</em>
34823528
*
34833529
* <h4>Example</h4>
34843530
*
@@ -3491,7 +3537,7 @@ this.createjs = this.createjs || {};
34913537
* createjs.Sound.addEventListener("fileload", handleLoad);
34923538
* createjs.Sound.registerSounds(sounds);
34933539
*
3494-
* <h4>Known Browser and OS issues</h4>
3540+
* <h3>Known Browser and OS issues</h3>
34953541
* <b>IE 9 HTML Audio limitations</b><br />
34963542
* <ul><li>There is a delay in applying volume changes to tags that occurs once playback is started. So if you have
34973543
* muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of
@@ -3500,20 +3546,23 @@ this.createjs = this.createjs || {};
35003546
* encoding with 64kbps works.</li>
35013547
* <li>Occasionally very short samples will get cut off.</li>
35023548
* <li>There is a limit to how many audio tags you can load and play at once, which appears to be determined by
3503-
* hardware and browser settings. See {{#crossLink "HTMLAudioPlugin.MAX_INSTANCES"}}{{/crossLink}} for a safe estimate.</li></ul>
3549+
* hardware and browser settings. See {{#crossLink "HTMLAudioPlugin.MAX_INSTANCES"}}{{/crossLink}} for a safe
3550+
* estimate.</li></ul>
35043551
*
35053552
* <b>Firefox 25 Web Audio limitations</b>
35063553
* <ul><li>mp3 audio files do not load properly on all windows machines, reported
35073554
* <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=929969" target="_blank">here</a>. </br>
3508-
* For this reason it is recommended to pass another FF supported type (ie ogg) first until this bug is resolved, if possible.</li></ul>
3555+
* For this reason it is recommended to pass another FF supported type (ie ogg) first until this bug is resolved, if
3556+
* possible.</li></ul>
35093557
35103558
* <b>Safari limitations</b><br />
35113559
* <ul><li>Safari requires Quicktime to be installed for audio playback.</li></ul>
35123560
*
35133561
* <b>iOS 6 Web Audio limitations</b><br />
3514-
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event
3515-
* (touch/click).</li>
3516-
* <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>
3562+
* <ul><li>Sound is initially locked, and must be unlocked via a user-initiated event. Please see the section on
3563+
* Mobile Playback above.</li>
3564+
* <li>A bug exists that will distort un-cached web audio when a video element is present in the DOM that has audio
3565+
* at a different sampleRate.</li>
35173566
* </ul>
35183567
*
35193568
* <b>Android HTML Audio limitations</b><br />
@@ -3522,8 +3571,8 @@ this.createjs = this.createjs || {};
35223571
* a delay.</li></ul>
35233572
*
35243573
* <b>Web Audio and PreloadJS</b><br />
3525-
* <ul><li>Web Audio must be loaded through XHR, therefore when used with PreloadJS tag loading is not possible. This means that tag loading cannot
3526-
* be used to avoid cross domain issues if WebAudioPlugin is used</li><ul>
3574+
* <ul><li>Web Audio must be loaded through XHR, therefore when used with PreloadJS, tag loading is not possible.
3575+
* This means that tag loading can not be used to avoid cross domain issues.</li><ul>
35273576
*
35283577
* @class Sound
35293578
* @static
@@ -6168,7 +6217,7 @@ this.createjs = this.createjs || {};
61686217
this._audioSources[loadItem.src] = true;
61696218
this._soundInstances[loadItem.src] = [];
61706219
loader = new this._loaderClass(loadItem);
6171-
loader.on("complete", createjs.proxy(this._handlePreloadComplete, this));
6220+
loader.on("complete", this._handlePreloadComplete, this);
61726221
this._loaders[loadItem.src] = loader;
61736222
return loader;
61746223
};
@@ -6180,7 +6229,7 @@ this.createjs = this.createjs || {};
61806229
* @param {Loader} loader The sound URI to load.
61816230
*/
61826231
p.preload = function (loader) {
6183-
loader.on("error", createjs.proxy(this._handlePreloadError, this));
6232+
loader.on("error", this._handlePreloadError, this);
61846233
loader.load();
61856234
};
61866235

@@ -6728,18 +6777,29 @@ this.createjs = this.createjs || {};
67286777
67296778
* <h4>Known Browser and OS issues for Web Audio</h4>
67306779
* <b>Firefox 25</b>
6731-
* <ul><li>mp3 audio files do not load properly on all windows machines, reported
6732-
* <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=929969" target="_blank">here</a>. </br>
6733-
* For this reason it is recommended to pass another FF supported type (ie ogg) first until this bug is resolved, if possible.</li></ul>
6734-
* <br />
6780+
* <li>
6781+
* mp3 audio files do not load properly on all windows machines, reported <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=929969" target="_blank">here</a>.
6782+
* <br />For this reason it is recommended to pass another FireFox-supported type (i.e. ogg) as the default
6783+
* extension, until this bug is resolved
6784+
* </li>
6785+
*
67356786
* <b>Webkit (Chrome and Safari)</b>
6736-
* <ul><li>AudioNode.disconnect does not always seem to work. This can cause the file size to grow over time if you
6737-
* are playing a lot of audio files.</li></ul>
6738-
* <br />
6787+
* <li>
6788+
* AudioNode.disconnect does not always seem to work. This can cause the file size to grow over time if you
6789+
* are playing a lot of audio files.
6790+
* </li>
6791+
*
67396792
* <b>iOS 6 limitations</b>
6740-
* <ul><li>Sound is initially muted and will only unmute through play being called inside a user initiated event (touch/click).</li>
6741-
* <li>A bug exists that will distort uncached audio when a video element is present in the DOM. You can avoid this bug
6742-
* by ensuring the audio and video audio share the same sampleRate.</li>
6793+
* <ul>
6794+
* <li>
6795+
* Sound is initially muted and will only unmute through play being called inside a user initiated event
6796+
* (touch/click). Please read the mobile playback notes in the the {{#crossLink "Sound"}}{{/crossLink}}
6797+
* class for a full overview of the limitations, and how to get around them.
6798+
* </li>
6799+
* <li>
6800+
* A bug exists that will distort un-cached audio when a video element is present in the DOM. You can avoid
6801+
* this bug by ensuring the audio and video audio share the same sample rate.
6802+
* </li>
67436803
* </ul>
67446804
* @class WebAudioPlugin
67456805
* @extends AbstractPlugin
@@ -6856,6 +6916,7 @@ this.createjs = this.createjs || {};
68566916
* empty sound.
68576917
* @property _unlocked
68586918
* @type {boolean}
6919+
* @since 0.6.2
68596920
* @private
68606921
*/
68616922
s._unlocked = false;
@@ -7032,6 +7093,7 @@ this.createjs = this.createjs || {};
70327093
* a `touchstart` event to support older platforms may preclude a `mousedown` even from getting fired on iOS9, so we
70337094
* stick with `mousedown` and `touchend`.
70347095
* @method _unlock
7096+
* @since 0.6.2
70357097
* @private
70367098
*/
70377099
s._unlock = function() {

lib/soundjs-NEXT.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/soundjs/AbstractPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ this.createjs = this.createjs || {};
159159
this._audioSources[loadItem.src] = true;
160160
this._soundInstances[loadItem.src] = [];
161161
loader = new this._loaderClass(loadItem);
162-
loader.on("complete", createjs.proxy(this._handlePreloadComplete, this));
162+
loader.on("complete", this._handlePreloadComplete, this);
163163
this._loaders[loadItem.src] = loader;
164164
return loader;
165165
};
@@ -171,7 +171,7 @@ this.createjs = this.createjs || {};
171171
* @param {Loader} loader The sound URI to load.
172172
*/
173173
p.preload = function (loader) {
174-
loader.on("error", createjs.proxy(this._handlePreloadError, this));
174+
loader.on("error", this._handlePreloadError, this);
175175
loader.load();
176176
};
177177

0 commit comments

Comments
 (0)