Skip to content

Commit e85f6bd

Browse files
committed
v2.0.10
1 parent 0f8b3be commit e85f6bd

File tree

8 files changed

+57
-22
lines changed

8 files changed

+57
-22
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.10 (May 5, 2018)
2+
- `FIXED` Fixed another Chrome deprecation warning when using panning methods ([#923](https://github.com/goldfire/howler.js/issues/923)).
3+
- `FIXED` Playback rate wasn't working correctly in Internet Explorer when defined in the `Howl` constructor ([#936](https://github.com/goldfire/howler.js/issues/936)).
4+
- `FIXED` Looped audio would only play twice in Internet Explorer ([#921](https://github.com/goldfire/howler.js/issues/921)).
5+
16
## 2.0.9 (February 10, 2018)
27
- `FIXED` More accurate HTML5 Audio `end` timer and fix for Firefox streams ending early ([#883](https://github.com/goldfire/howler.js/issues/883)).
38
- `FIXED` Prevent `play` events from duplicating in certain instances ([#899](https://github.com/goldfire/howler.js/issues/899)).

dist/howler.core.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.

dist/howler.js

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* howler.js v2.0.9
2+
* howler.js v2.0.10
33
* howlerjs.com
44
*
55
* (c) 2013-2018, James Simpson of GoldFire Studios
@@ -782,6 +782,9 @@
782782
self._emit('play', sound._id);
783783
}
784784

785+
// Setting rate before playing won't work in IE, so we set it again here.
786+
node.playbackRate = sound._rate;
787+
785788
// If the node is still paused, then we can assume there was a playback issue.
786789
if (node.paused) {
787790
self._emit('playerror', sound._id, 'Playback was unable to start. This is most commonly an issue ' +
@@ -790,7 +793,7 @@
790793
}
791794

792795
// Setup the end timer on sprites or listen for the ended event.
793-
if (sprite !== '__default') {
796+
if (sprite !== '__default' || sound._loop) {
794797
self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
795798
} else {
796799
self._endTimers[sound._id] = function() {
@@ -2309,7 +2312,7 @@
23092312
/*!
23102313
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
23112314
*
2312-
* howler.js v2.0.9
2315+
* howler.js v2.0.10
23132316
* howlerjs.com
23142317
*
23152318
* (c) 2013-2018, James Simpson of GoldFire Studios
@@ -2325,7 +2328,7 @@
23252328
// Setup default properties.
23262329
HowlerGlobal.prototype._pos = [0, 0, 0];
23272330
HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0];
2328-
2331+
23292332
/** Global Methods **/
23302333
/***************************************************************************/
23312334

@@ -2373,7 +2376,14 @@
23732376

23742377
if (typeof x === 'number') {
23752378
self._pos = [x, y, z];
2376-
self.ctx.listener.setPosition(self._pos[0], self._pos[1], self._pos[2]);
2379+
2380+
if (typeof self.ctx.listener.positionX !== 'undefined') {
2381+
self.ctx.listener.positionX.setTargetAtTime(self._pos[0], Howler.ctx.currentTime, 0.1);
2382+
self.ctx.listener.positionY.setTargetAtTime(self._pos[1], Howler.ctx.currentTime, 0.1);
2383+
self.ctx.listener.positionZ.setTargetAtTime(self._pos[2], Howler.ctx.currentTime, 0.1);
2384+
} else {
2385+
self.ctx.listener.setPosition(self._pos[0], self._pos[1], self._pos[2]);
2386+
}
23772387
} else {
23782388
return self._pos;
23792389
}
@@ -2413,7 +2423,17 @@
24132423

24142424
if (typeof x === 'number') {
24152425
self._orientation = [x, y, z, xUp, yUp, zUp];
2416-
self.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp);
2426+
2427+
if (typeof self.ctx.listener.forwardX !== 'undefined') {
2428+
self.ctx.listener.forwardX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1);
2429+
self.ctx.listener.forwardY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1);
2430+
self.ctx.listener.forwardZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1);
2431+
self.ctx.listener.upX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1);
2432+
self.ctx.listener.upY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1);
2433+
self.ctx.listener.upZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1);
2434+
} else {
2435+
self.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp);
2436+
}
24172437
} else {
24182438
return or;
24192439
}
@@ -2519,7 +2539,9 @@
25192539
}
25202540

25212541
if (pannerType === 'spatial') {
2522-
sound._panner.setPosition(pan, 0, 0);
2542+
sound._panner.positionX.setValueAtTime(pan, Howler.ctx.currentTime);
2543+
sound._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime);
2544+
sound._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime);
25232545
} else {
25242546
sound._panner.pan.setValueAtTime(pan, Howler.ctx.currentTime);
25252547
}
@@ -2593,7 +2615,9 @@
25932615
setupPanner(sound, 'spatial');
25942616
}
25952617

2596-
sound._panner.setPosition(x, y, z);
2618+
sound._panner.positionX.setValueAtTime(x, Howler.ctx.currentTime);
2619+
sound._panner.positionY.setValueAtTime(y, Howler.ctx.currentTime);
2620+
sound._panner.positionZ.setValueAtTime(z, Howler.ctx.currentTime);
25972621
}
25982622

25992623
self._emit('pos', sound._id);
@@ -2671,7 +2695,9 @@
26712695
setupPanner(sound, 'spatial');
26722696
}
26732697

2674-
sound._panner.setOrientation(x, y, z);
2698+
sound._panner.orientationX.setValueAtTime(x, Howler.ctx.currentTime);
2699+
sound._panner.orientationY.setValueAtTime(y, Howler.ctx.currentTime);
2700+
sound._panner.orientationZ.setValueAtTime(z, Howler.ctx.currentTime);
26752701
}
26762702

26772703
self._emit('orientation', sound._id);
@@ -2711,7 +2737,7 @@
27112737
* with `inverse` and `exponential`.
27122738
* panningModel - ('HRTF' by default) Determines which spatialization algorithm is used to position audio.
27132739
* Can be `HRTF` or `equalpower`.
2714-
*
2740+
*
27152741
* @return {Howl/Object} Returns self or current panner attributes.
27162742
*/
27172743
Howl.prototype.pannerAttr = function() {
@@ -2886,8 +2912,12 @@
28862912
sound._panner.refDistance = sound._pannerAttr.refDistance;
28872913
sound._panner.rolloffFactor = sound._pannerAttr.rolloffFactor;
28882914
sound._panner.panningModel = sound._pannerAttr.panningModel;
2889-
sound._panner.setPosition(sound._pos[0], sound._pos[1], sound._pos[2]);
2890-
sound._panner.setOrientation(sound._orientation[0], sound._orientation[1], sound._orientation[2]);
2915+
sound._panner.positionX.setValueAtTime(sound._pos[0], Howler.ctx.currentTime);
2916+
sound._panner.positionY.setValueAtTime(sound._pos[1], Howler.ctx.currentTime);
2917+
sound._panner.positionZ.setValueAtTime(sound._pos[2], Howler.ctx.currentTime);
2918+
sound._panner.orientationX.setValueAtTime(sound._orientation[0], Howler.ctx.currentTime);
2919+
sound._panner.orientationY.setValueAtTime(sound._orientation[1], Howler.ctx.currentTime);
2920+
sound._panner.orientationZ.setValueAtTime(sound._orientation[2], Howler.ctx.currentTime);
28912921
} else {
28922922
sound._panner = Howler.ctx.createStereoPanner();
28932923
sound._panner.pan.setValueAtTime(sound._stereo, Howler.ctx.currentTime);

dist/howler.min.js

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

dist/howler.spatial.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.

package.json

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

src/howler.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* howler.js v2.0.9
2+
* howler.js v2.0.10
33
* howlerjs.com
44
*
55
* (c) 2013-2018, James Simpson of GoldFire Studios

src/plugins/howler.spatial.js

Lines changed: 1 addition & 1 deletion
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.0.9
4+
* howler.js v2.0.10
55
* howlerjs.com
66
*
77
* (c) 2013-2018, James Simpson of GoldFire Studios

0 commit comments

Comments
 (0)