aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/audio.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2017-10-17 17:57:44 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2017-10-17 17:57:44 +0300
commitc1c851d7817cdc1df4cf5f2bccd9a4d3feae94a8 (patch)
treeae862eb636d39cf3c2b33bdac04e28ad8f97b92f /ext/bg/js/audio.js
parent81f0a616519d1cea66ee54ec47c5da868a208ef6 (diff)
merged mode: support {audio} marker (first term)
Diffstat (limited to 'ext/bg/js/audio.js')
-rw-r--r--ext/bg/js/audio.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js
index ce47490c..549288f5 100644
--- a/ext/bg/js/audio.js
+++ b/ext/bg/js/audio.js
@@ -140,8 +140,13 @@ async function audioInject(definition, fields, mode) {
}
try {
- const url = await audioBuildUrl(definition, mode);
- const filename = audioBuildFilename(definition);
+ let audioSourceDefinition = definition;
+ if (definition.hasOwnProperty('expressions')) {
+ audioSourceDefinition = definition.expressions[0];
+ }
+
+ const url = await audioBuildUrl(audioSourceDefinition, mode);
+ const filename = audioBuildFilename(audioSourceDefinition);
if (url && filename) {
definition.audio = {url, filename};