From fef15ceb99ed787be09c90495c6337286ad26113 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Mon, 30 Nov 2020 15:20:32 +0800 Subject: [PATCH] fix alac playback on firefox and chrome --- src/scripts/browserDeviceProfile.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 0e8a7991d..7bc2f6a6b 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -538,17 +538,27 @@ import browser from './browser'; Type: 'Audio' }); - if (audioFormat === 'webma') { + // https://www.webmproject.org/about/faq/ + if (audioFormat === 'opus' || audioFormat === 'webma') { profile.DirectPlayProfiles.push({ Container: 'webm', + AudioCodec: audioFormat, Type: 'Audio' }); } // aac also appears in the m4a and m4b container + // m4a/alac only works when using safari if (audioFormat === 'aac' || audioFormat === 'alac') { profile.DirectPlayProfiles.push({ - Container: 'm4a,m4b', + Container: 'm4a', + AudioCodec: audioFormat, + Type: 'Audio' + }); + + profile.DirectPlayProfiles.push({ + Container: 'm4b', + AudioCodec: audioFormat, Type: 'Audio' }); }