aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/audio.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-12 23:04:32 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-13 12:20:56 -0400
commit54d4c65854289de9d454198d7575d3db824cf0f1 (patch)
tree54daa5b66b2bd72924334eb339ccecabb40eaa5b /ext/mixed/js/audio.js
parent21a2730cdeef80327285f77a155451a8fbf67939 (diff)
Rename audioGetFromSources's createAudioObject argument to download
Diffstat (limited to 'ext/mixed/js/audio.js')
-rw-r--r--ext/mixed/js/audio.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mixed/js/audio.js b/ext/mixed/js/audio.js
index 5e3b9164..50bd321f 100644
--- a/ext/mixed/js/audio.js
+++ b/ext/mixed/js/audio.js
@@ -32,7 +32,7 @@ function audioGetFromUrl(url) {
});
}
-async function audioGetFromSources(expression, sources, optionsContext, createAudioObject, cache=null) {
+async function audioGetFromSources(expression, sources, optionsContext, download, cache=null) {
const key = `${expression.expression}:${expression.reading}`;
if (cache !== null && cache.hasOwnProperty(expression)) {
return cache[key];
@@ -46,7 +46,7 @@ async function audioGetFromSources(expression, sources, optionsContext, createAu
}
try {
- const audio = createAudioObject ? await audioGetFromUrl(url) : null;
+ const audio = download ? null : await audioGetFromUrl(url);
const result = {audio, url, source};
if (cache !== null) {
cache[key] = result;