Skip to content

Commit

Permalink
v2.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed May 9, 2018
1 parent 6985d63 commit df3aa43
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.0.12 (May 9, 2018)
- `FIXED` The previous Chrome deprecation fixes broke spatial positioning in Safari.

## 2.0.10 (May 5, 2018)
- `FIXED` Fixed another Chrome deprecation warning when using panning methods ([#923](https://github.com/goldfire/howler.js/issues/923)).
- `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)).
Expand Down
2 changes: 1 addition & 1 deletion dist/howler.core.min.js

Large diffs are not rendered by default.

46 changes: 32 additions & 14 deletions dist/howler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* howler.js v2.0.10
* howler.js v2.0.12
* howlerjs.com
*
* (c) 2013-2018, James Simpson of GoldFire Studios
Expand Down Expand Up @@ -2312,7 +2312,7 @@
/*!
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
*
* howler.js v2.0.10
* howler.js v2.0.12
* howlerjs.com
*
* (c) 2013-2018, James Simpson of GoldFire Studios
Expand Down Expand Up @@ -2539,9 +2539,13 @@
}

if (pannerType === 'spatial') {
sound._panner.positionX.setValueAtTime(pan, Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime);
if (typeof sound._panner.positionX !== 'undefined') {
sound._panner.positionX.setValueAtTime(pan, Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime);
} else {
sound._panner.setPosition(pan, 0, 0);
}
} else {
sound._panner.pan.setValueAtTime(pan, Howler.ctx.currentTime);
}
Expand Down Expand Up @@ -2615,9 +2619,13 @@
setupPanner(sound, 'spatial');
}

sound._panner.positionX.setValueAtTime(x, Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(y, Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(z, Howler.ctx.currentTime);
if (typeof sound._panner.positionX !== 'undefined') {
sound._panner.positionX.setValueAtTime(x, Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(y, Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(z, Howler.ctx.currentTime);
} else {
sound._panner.setOrientation(x, y, z);
}
}

self._emit('pos', sound._id);
Expand Down Expand Up @@ -2912,12 +2920,22 @@
sound._panner.refDistance = sound._pannerAttr.refDistance;
sound._panner.rolloffFactor = sound._pannerAttr.rolloffFactor;
sound._panner.panningModel = sound._pannerAttr.panningModel;
sound._panner.positionX.setValueAtTime(sound._pos[0], Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(sound._pos[1], Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(sound._pos[2], Howler.ctx.currentTime);
sound._panner.orientationX.setValueAtTime(sound._orientation[0], Howler.ctx.currentTime);
sound._panner.orientationY.setValueAtTime(sound._orientation[1], Howler.ctx.currentTime);
sound._panner.orientationZ.setValueAtTime(sound._orientation[2], Howler.ctx.currentTime);

if (typeof sound._panner.positionX !== 'undefined') {
sound._panner.positionX.setValueAtTime(sound._pos[0], Howler.ctx.currentTime);
sound._panner.positionY.setValueAtTime(sound._pos[1], Howler.ctx.currentTime);
sound._panner.positionZ.setValueAtTime(sound._pos[2], Howler.ctx.currentTime);
} else {
sound._panner.setPosition(sound._pos[0], sound._pos[1], sound._pos[2]);
}

if (typeof sound._panner.orientationX !== 'undefined') {
sound._panner.orientationX.setValueAtTime(sound._orientation[0], Howler.ctx.currentTime);
sound._panner.orientationY.setValueAtTime(sound._orientation[1], Howler.ctx.currentTime);
sound._panner.orientationZ.setValueAtTime(sound._orientation[2], Howler.ctx.currentTime);
} else {
sound._panner.setOrientation(sound._orientation[0], sound._orientation[1], sound._orientation[2]);
}
} else {
sound._panner = Howler.ctx.createStereoPanner();
sound._panner.pan.setValueAtTime(sound._stereo, Howler.ctx.currentTime);
Expand Down
4 changes: 2 additions & 2 deletions dist/howler.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/howler.spatial.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "howler",
"version": "2.0.10",
"version": "2.0.12",
"description": "Javascript audio library for the modern web.",
"homepage": "https://howlerjs.com",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* howler.js v2.0.10
* howler.js v2.0.12
* howlerjs.com
*
* (c) 2013-2018, James Simpson of GoldFire Studios
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/howler.spatial.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
*
* howler.js v2.0.10
* howler.js v2.0.12
* howlerjs.com
*
* (c) 2013-2018, James Simpson of GoldFire Studios
Expand Down

0 comments on commit df3aa43

Please sign in to comment.