Skip to content

Instantly share code, notes, and snippets.

@dmlap
Created October 24, 2013 16:30
Show Gist options
  • Save dmlap/7140421 to your computer and use it in GitHub Desktop.
Save dmlap/7140421 to your computer and use it in GitHub Desktop.
Send an ajax request with an arraybuffer response
var req = new XMLHttpRequest();
req.open('GET', segmentUrl, true);
req.responseType = 'arraybuffer';
req.onload = function(response) {
self.onSegmentLoadComplete(new Uint8Array(req.response));
};
req.send(null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment