aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/audio-downloader.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-10 19:18:28 -0500
committerGitHub <noreply@github.com>2021-02-10 19:18:28 -0500
commit07cd006127c23c17e5c750122a4ac6916994bc76 (patch)
treede4ab1f7005181790f598d9e12d7ffffc1e09a38 /ext/bg/js/audio-downloader.js
parent673952e82576b0bc4b6b02c2105fbb1850e55950 (diff)
Add support for multiple types of audio (#1366)
Diffstat (limited to 'ext/bg/js/audio-downloader.js')
-rw-r--r--ext/bg/js/audio-downloader.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/audio-downloader.js b/ext/bg/js/audio-downloader.js
index 62abda8f..25c25250 100644
--- a/ext/bg/js/audio-downloader.js
+++ b/ext/bg/js/audio-downloader.js
@@ -252,7 +252,9 @@ class AudioDownloader {
throw new Error('Could not retrieve audio');
}
- return this._arrayBufferToBase64(arrayBuffer);
+ const data = this._arrayBufferToBase64(arrayBuffer);
+ const contentType = response.headers.get('Content-Type');
+ return {data, contentType};
}
async _isAudioBinaryValid(arrayBuffer, source) {