diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-19 10:16:59 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-19 10:16:59 -0400 |
commit | 7faaf4e45737dd06ab3fdf189bd9c1d26ad1349d (patch) | |
tree | 595d741cdde5b88e93189b9e4938ad6a98899cf4 /ext/mixed | |
parent | 07e5e5c15b20077fd325b2546ae96c5a50d4c1bd (diff) |
Use 'content' instead of 'source' to contain media file data
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/media-loader.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mixed/js/media-loader.js b/ext/mixed/js/media-loader.js index c89c4f12..5e3177fc 100644 --- a/ext/mixed/js/media-loader.js +++ b/ext/mixed/js/media-loader.js @@ -86,7 +86,7 @@ class MediaLoader { const token = this._token; const data = (await apiGetMedia([{path, dictionaryName}]))[0]; if (token === this._token && data !== null) { - const sourceArrayBuffer = this._base64ToArrayBuffer(data.source); + const sourceArrayBuffer = this._base64ToArrayBuffer(data.content); const blob = new Blob([sourceArrayBuffer], {type: data.mediaType}); const url = URL.createObjectURL(blob); cachedData.data = data; @@ -95,8 +95,8 @@ class MediaLoader { return cachedData; } - _base64ToArrayBuffer(source) { - const binarySource = window.atob(source); + _base64ToArrayBuffer(content) { + const binarySource = window.atob(content); const length = binarySource.length; const array = new Uint8Array(length); for (let i = 0; i < length; ++i) { |