mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Apply Maximum Allowed Audio Channels to DirectPlay
This commit is contained in:
parent
7949ff4f0a
commit
7807f8f062
1 changed files with 36 additions and 8 deletions
|
@ -875,17 +875,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…
Add table
Add a link
Reference in a new issue