Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/howler.core.min.js

Large diffs are not rendered by default.

33 changes: 22 additions & 11 deletions dist/howler.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@
method: o.xhr && o.xhr.method ? o.xhr.method : 'GET',
headers: o.xhr && o.xhr.headers ? o.xhr.headers : null,
withCredentials: o.xhr && o.xhr.withCredentials ? o.xhr.withCredentials : false,
// adding onprogress setting for XHR fetching
onprogress: o.xhr && o.xhr.onprogress ? o.xhr.onprogress : null,
};

// Setup all other default properties.
Expand Down Expand Up @@ -2167,6 +2169,10 @@
var self = this;
var isIOS = Howler._navigator && Howler._navigator.vendor.indexOf('Apple') >= 0;

if (!node.bufferSource) {
return self;
}

if (Howler._scratchBuffer && node.bufferSource) {
node.bufferSource.onended = null;
node.bufferSource.disconnect(0);
Expand Down Expand Up @@ -2406,6 +2412,9 @@
xhr.withCredentials = self._xhr.withCredentials;
xhr.responseType = 'arraybuffer';


self._xhr.onprogress!==null ? xhr.addEventListener("progress",self._xhr.onprogress) : null;

// Apply any custom headers to the request.
if (self._xhr.headers) {
Object.keys(self._xhr.headers).forEach(function(key) {
Expand Down Expand Up @@ -3099,26 +3108,28 @@
panningModel: typeof o.panningModel !== 'undefined' ? o.panningModel : pa.panningModel
};

// Update the panner values or create a new panner if none exists.
// Create a new panner node if one doesn't already exist.
var panner = sound._panner;
if (panner) {
panner.coneInnerAngle = pa.coneInnerAngle;
panner.coneOuterAngle = pa.coneOuterAngle;
panner.coneOuterGain = pa.coneOuterGain;
panner.distanceModel = pa.distanceModel;
panner.maxDistance = pa.maxDistance;
panner.refDistance = pa.refDistance;
panner.rolloffFactor = pa.rolloffFactor;
panner.panningModel = pa.panningModel;
} else {
if (!panner) {
// Make sure we have a position to setup the node with.
if (!sound._pos) {
sound._pos = self._pos || [0, 0, -0.5];
}

// Create a new panner node.
setupPanner(sound, 'spatial');
panner = sound._panner
}

// Update the panner values or create a new panner if none exists.
panner.coneInnerAngle = pa.coneInnerAngle;
panner.coneOuterAngle = pa.coneOuterAngle;
panner.coneOuterGain = pa.coneOuterGain;
panner.distanceModel = pa.distanceModel;
panner.maxDistance = pa.maxDistance;
panner.refDistance = pa.refDistance;
panner.rolloffFactor = pa.rolloffFactor;
panner.panningModel = pa.panningModel;
}
}

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

Large diffs are not rendered by default.

Loading