function arrayBufferToDataURL(arrayBuffer, mimeType) {
  var uint8 = new Uint8Array(arrayBuffer);
  var data = '';

  // TypedArray.prototype.forEach is not supported in some browsers.
  forEach(uint8, function (value) {
    data += fromCharCode(value);
  });

  return 'data:' + mimeType + ';base64,' + btoa(data);
}
function arrayBufferToDataURL(arrayBuffer, mimeType) {
  var uint8 = new Uint8Array(arrayBuffer);
  var data = '';

  // TypedArray.prototype.forEach is not supported in some browsers.
  forEach(uint8, function (value) {
    data += fromCharCode(value);
  });

  return 'data:' + mimeType + ';base64,' + btoa(data);
}
function arrayBufferToDataURL ( arrayBuffer , mimeType ) { var uint8 = new Uint8Array ( arrayBuffer ) ; var data = '' ; // TypedArray.prototype.forEach is not supported in some browsers. forEach ( uint8 , function ( value ) { data += fromCharCode ( value ) ; } ) ; return 'data:' + mimeType + ';base64,' + btoa ( data ) ; }
Transform array buffer to Data URL.
@param {ArrayBuffer} arrayBuffer - The array buffer to transform.
@param {string} mimeType - The mime type of the Data URL.
@returns {string} The result Data URL.
Transform array buffer to Data URL .
Converts an arraybuffer to a data URL