Created
January 14, 2013 09:03
-
-
Save 72lions/4528745 to your computer and use it in GitHub Desktop.
Loading a binary data with the HXMLHttpRequest object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* It is responsible for loading all the different chunks | |
* | |
* @private | |
* @type {XMLHttpRequest} | |
*/ | |
var _request = new XMLHttpRequest(); | |
// Set the responseType to arraybuffer | |
_request.responseType = 'arraybuffer'; | |
_request.addEventListener('load', _onChunkLoaded, false); | |
_request.open('GET', 'chunks/' + _files[index], true); | |
_request.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment