mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge 2d1276e4ed
into 7d84185d0e
This commit is contained in:
commit
fec96433d5
3 changed files with 25 additions and 9 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue