merged mode: support {audio} marker (first term)

This commit is contained in:
siikamiika 2017-10-17 17:57:44 +03:00
parent 81f0a61651
commit c1c851d781

View File

@ -140,8 +140,13 @@ async function audioInject(definition, fields, mode) {
} }
try { try {
const url = await audioBuildUrl(definition, mode); let audioSourceDefinition = definition;
const filename = audioBuildFilename(definition); if (definition.hasOwnProperty('expressions')) {
audioSourceDefinition = definition.expressions[0];
}
const url = await audioBuildUrl(audioSourceDefinition, mode);
const filename = audioBuildFilename(audioSourceDefinition);
if (url && filename) { if (url && filename) {
definition.audio = {url, filename}; definition.audio = {url, filename};