1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

audio directplay profile cleanup

This commit is contained in:
nyanmisaka 2020-11-01 04:15:46 +08:00
parent 0d846fa06d
commit c7cc220c22

View file

@ -518,21 +518,14 @@ define(['browser'], function (browser) {
});
['opus', 'mp3', 'mp2', 'aac', 'flac', 'alac', 'webma', 'wma', 'wav', 'ogg', 'oga'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
if (audioFormat === 'mp2') {
profile.DirectPlayProfiles.push({
Container: audioFormat,
Type: 'Audio'
});
if (audioFormat === 'webma') {
profile.DirectPlayProfiles.push({
Container: 'mp2,mp3',
Type: 'Audio',
AudioCodec: audioFormat
});
} else if (audioFormat === 'mp3') {
profile.DirectPlayProfiles.push({
Container: audioFormat,
Type: 'Audio',
AudioCodec: audioFormat
});
} else {
profile.DirectPlayProfiles.push({
Container: audioFormat === 'webma' ? 'webma,webm' : audioFormat,
Container: 'webm',
Type: 'Audio'
});
}
@ -541,7 +534,6 @@ define(['browser'], function (browser) {
if (audioFormat === 'aac' || audioFormat === 'alac') {
profile.DirectPlayProfiles.push({
Container: 'm4a,m4b',
AudioCodec: audioFormat,
Type: 'Audio'
});
}