diff --git a/lib/audio/client/manager.js b/lib/audio/client/manager.js index 2fbf5c552..f6b122d8d 100644 --- a/lib/audio/client/manager.js +++ b/lib/audio/client/manager.js @@ -146,13 +146,13 @@ class AudioManager findAudioInObjectKey(audioKey, audiosObject) { + if(sc.hasOwn(audiosObject, audioKey)){ + return {audio: audiosObject[audioKey], marker: false}; + } let objectKeys = Object.keys(audiosObject); if(0 === objectKeys.length){ return false; } - if(sc.hasOwn(audiosObject, audioKey)){ - return {audio: audiosObject[audioKey], marker: false}; - } for(let i of objectKeys){ let audio = audiosObject[i]; if(sc.hasOwn(audio.audioInstance.markers, audioKey)){ diff --git a/migrations/production/reldens-sample-data-v4.0.0.sql b/migrations/production/reldens-sample-data-v4.0.0.sql index 6299e805e..171e3aa86 100644 --- a/migrations/production/reldens-sample-data-v4.0.0.sql +++ b/migrations/production/reldens-sample-data-v4.0.0.sql @@ -100,7 +100,7 @@ REPLACE INTO `ads_types` (`id`, `key`) VALUES REPLACE INTO `audio` (`id`, `audio_key`, `files_name`, `config`, `room_id`, `category_id`, `enabled`) VALUES (3, 'footstep', 'footstep.mp3', NULL, NULL, 3, 1), - (4, 'ReldensTownAudio', 'reldens-town.mp3', '', 4, 1, 1); + (4, 'reldens-town', 'reldens-town.mp3', '', 4, 1, 1); REPLACE INTO `audio_categories` (`id`, `category_key`, `category_label`, `enabled`, `single_audio`) VALUES (1, 'music', 'Music', 1, 1),