1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
Dmitry Lyzo 2025-03-30 11:01:13 -04:00 committed by GitHub
commit fec96433d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 9 deletions

View file

@ -1302,6 +1302,10 @@ export class PlaybackManager {
return false;
}
if (mediaStream.SupportsDirectPlay != null) {
return mediaStream.SupportsDirectPlay;
}
const container = mediaSource.Container.toLowerCase();
const codec = (mediaStream.Codec || '').toLowerCase();

View file

@ -740,6 +740,10 @@ export class HtmlVideoPlayer {
* @private
*/
isAudioStreamSupported(stream, deviceProfile, container) {
if (stream.SupportsDirectPlay != null) {
return stream.SupportsDirectPlay;
}
const codec = (stream.Codec || '').toLowerCase();
if (!codec) {

View file

@ -942,15 +942,6 @@ export default function (options) {
});
}
if (!supportsSecondaryAudio) {
aacCodecProfileConditions.push({
Condition: 'Equals',
Property: 'IsSecondaryAudio',
Value: 'false',
IsRequired: false
});
}
if (aacCodecProfileConditions.length) {
profile.CodecProfiles.push({
Type: 'VideoAudio',
@ -985,6 +976,23 @@ export default function (options) {
Value: 'false',
IsRequired: false
});
// FIXME: Most likely, it is always `FirstSupported`
if (browser.chrome || browser.firefox || browser.tizen || browser.web0s) {
profile.SingleAudioPolicy = 'FirstSupported';
} else {
profile.SingleAudioPolicy = 'First';
}
}
if (browser.chrome && browser.versionMajor >= 115) {
// Chrome 115+ detects only default audio tracks - BROKEN
globalVideoAudioCodecProfileConditions.push({
Condition: 'Equals',
Property: 'IsDefaultTrack',
Value: 'true',
IsRequired: false
});
}
if (globalAudioCodecProfileConditions.length) {