Skip to content

Commit

Permalink
Merge pull request #610 from jfpalacios/master
Browse files Browse the repository at this point in the history
Add support for withCredentials
  • Loading branch information
goldfire committed Aug 18, 2017
2 parents 908c2ba + aadc6d9 commit 1ed32d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/howler.core.js
Expand Up @@ -473,6 +473,7 @@
self._sprite = o.sprite || {};
self._src = (typeof o.src !== 'string') ? o.src : [o.src];
self._volume = o.volume !== undefined ? o.volume : 1;
self._xhrWithCredentials = o.xhrWithCredentials || false;

// Setup all other default properties.
self._duration = 0;
Expand Down Expand Up @@ -2084,6 +2085,7 @@
// Load the buffer from the URL.
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.withCredentials = self._xhrWithCredentials;
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
// Make sure we get a successful response back.
Expand Down

0 comments on commit 1ed32d7

Please sign in to comment.