summaryrefslogtreecommitdiff
path: root/ext/mixed/js/audio-system.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/audio-system.js')
-rw-r--r--ext/mixed/js/audio-system.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mixed/js/audio-system.js b/ext/mixed/js/audio-system.js
index 07e1a79b..9bf12510 100644
--- a/ext/mixed/js/audio-system.js
+++ b/ext/mixed/js/audio-system.js
@@ -185,7 +185,11 @@ class AudioSystem {
throw new Error('Could not retrieve audio');
}
- return arrayBuffer;
+ return this._arrayBufferToBase64(arrayBuffer);
+ }
+
+ _arrayBufferToBase64(arrayBuffer) {
+ return btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
}
_isAudioValid(audio) {