Skip to content

Commit 9ad4eb1

Browse files
committedDec 21, 2018
v2.1.1
1 parent e46e35b commit 9ad4eb1

8 files changed

+33
-11
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.1 (December 21, 2018)
2+
- `FIXED` Regression that broke simple play/pause usage in certain edge cases ([#1101](https://github.com/goldfire/howler.js/issues/1101)).
3+
- `FIXED` Loading and unloading multiple Howls with the same src could cause them all to unload ([#1103](https://github.com/goldfire/howler.js/issues/1103)).
4+
15
## 2.1.0 (December 12, 2018)
26
- `ADDED` Howler now maintains a general pool of HTML5 Audio nodes that are unlocked on first user input, which fixes issues with subsequent HTML5 Audio plays not working ([#1008](https://github.com/goldfire/howler.js/pull/1008)).
37
- `ADDED` New global `html5PoolSize` option that allows setting the default size of the HTML5 Audio object pool ([#1008](https://github.com/goldfire/howler.js/pull/1008)).

‎dist/howler.core.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/howler.js

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* howler.js v2.1.0
2+
* howler.js v2.1.1
33
* howlerjs.com
44
*
55
* (c) 2013-2018, James Simpson of GoldFire Studios
@@ -717,6 +717,24 @@
717717
} else if (typeof sprite === 'undefined') {
718718
// Use the default sound sprite (plays the full audio length).
719719
sprite = '__default';
720+
721+
// Check if there is a single paused sound that isn't ended.
722+
// If there is, play that sound. If not, continue as usual.
723+
if (!self._playLock) {
724+
var num = 0;
725+
for (var i=0; i<self._sounds.length; i++) {
726+
if (self._sounds[i]._paused && !self._sounds[i]._ended) {
727+
num++;
728+
id = self._sounds[i]._id;
729+
}
730+
}
731+
732+
if (num === 1) {
733+
sprite = null;
734+
} else {
735+
id = null;
736+
}
737+
}
720738
}
721739

722740
// Get the selected node, or get one from the pool.
@@ -1710,7 +1728,7 @@
17101728
// Delete this sound from the cache (if no other Howl is using it).
17111729
var remCache = true;
17121730
for (i=0; i<Howler._howls.length; i++) {
1713-
if (Howler._howls[i]._src === self._src) {
1731+
if (Howler._howls[i]._src === self._src || self._src.indexOf(Howler._howls[i]._src) >= 0) {
17141732
remCache = false;
17151733
break;
17161734
}
@@ -2461,7 +2479,7 @@
24612479
/*!
24622480
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
24632481
*
2464-
* howler.js v2.1.0
2482+
* howler.js v2.1.1
24652483
* howlerjs.com
24662484
*
24672485
* (c) 2013-2018, James Simpson of GoldFire Studios

‎dist/howler.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/howler.spatial.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "howler",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Javascript audio library for the modern web.",
55
"homepage": "https://howlerjs.com",
66
"keywords": [

‎src/howler.core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* howler.js v2.1.0
2+
* howler.js v2.1.1
33
* howlerjs.com
44
*
55
* (c) 2013-2018, James Simpson of GoldFire Studios

‎src/plugins/howler.spatial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
33
*
4-
* howler.js v2.1.0
4+
* howler.js v2.1.1
55
* howlerjs.com
66
*
77
* (c) 2013-2018, James Simpson of GoldFire Studios

0 commit comments

Comments
 (0)