mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 18:08:17 -07: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
@ -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) {
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Conditions: [
|
||||
{
|
||||
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({
|
||||
Type: 'VideoAudio',
|
||||
Conditions: globalVideoAudioCodecProfileConditions
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user