mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5972 from jellyfin-web/release-10.9.z
Apply Maximum Allowed Audio Channels to DirectPlay
Original-merge: 20ea6041a7
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
cf9af1f392
commit
5e33b983a5
1 changed files with 36 additions and 8 deletions
|
@ -906,17 +906,45 @@ export default function (options) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const globalAudioCodecProfileConditions = [];
|
||||||
|
const globalVideoAudioCodecProfileConditions = [];
|
||||||
|
|
||||||
|
if (parseInt(userSettings.allowedAudioChannels(), 10) > 0) {
|
||||||
|
globalAudioCodecProfileConditions.push({
|
||||||
|
Condition: 'LessThanEqual',
|
||||||
|
Property: 'AudioChannels',
|
||||||
|
Value: physicalAudioChannels.toString(),
|
||||||
|
IsRequired: false
|
||||||
|
});
|
||||||
|
|
||||||
|
globalVideoAudioCodecProfileConditions.push({
|
||||||
|
Condition: 'LessThanEqual',
|
||||||
|
Property: 'AudioChannels',
|
||||||
|
Value: physicalAudioChannels.toString(),
|
||||||
|
IsRequired: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!supportsSecondaryAudio) {
|
if (!supportsSecondaryAudio) {
|
||||||
|
globalVideoAudioCodecProfileConditions.push({
|
||||||
|
Condition: 'Equals',
|
||||||
|
Property: 'IsSecondaryAudio',
|
||||||
|
Value: 'false',
|
||||||
|
IsRequired: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (globalAudioCodecProfileConditions.length) {
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'Audio',
|
||||||
|
Conditions: globalAudioCodecProfileConditions
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (globalVideoAudioCodecProfileConditions.length) {
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'VideoAudio',
|
Type: 'VideoAudio',
|
||||||
Conditions: [
|
Conditions: globalVideoAudioCodecProfileConditions
|
||||||
{
|
|
||||||
Condition: 'Equals',
|
|
||||||
Property: 'IsSecondaryAudio',
|
|
||||||
Value: 'false',
|
|
||||||
IsRequired: false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue