diff --git a/guacamole-common-js/src/main/resources/audio.js b/guacamole-common-js/src/main/resources/audio.js index 9002dc1f3..8560aea55 100644 --- a/guacamole-common-js/src/main/resources/audio.js +++ b/guacamole-common-js/src/main/resources/audio.js @@ -68,7 +68,7 @@ Guacamole.AudioChannel = function() { * @param {String} mimetype The mimetype of the data provided. * @param {Number} duration The duration of the data provided, in * milliseconds. - * @param {String} data The base64-encoded data to play. + * @param {Blob} data The blob data to play. */ this.play = function(mimetype, duration, data) { @@ -130,7 +130,7 @@ Guacamole.AudioChannel.getTimestamp = function() { * @constructor * * @param {String} mimetype The mimetype of the data contained by this packet. - * @param {String} data The base64-encoded sound data contained by this packet. + * @param {Blob} data The blob of sound data contained by this packet. */ Guacamole.AudioChannel.Packet = function(mimetype, data) { @@ -154,19 +154,15 @@ Guacamole.AudioChannel.Packet = function(mimetype, data) { readyBuffer = buffer; }; - // Convert to ArrayBuffer - var binary = window.atob(data); - var arrayBuffer = new ArrayBuffer(binary.length); - var bufferView = new Uint8Array(arrayBuffer); - - for (var i=0; i