mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add audio options to workaround compatability problems
This commit is contained in:
parent
d4467424a0
commit
e810ec3cd9
6 changed files with 99 additions and 6 deletions
|
@ -738,10 +738,19 @@ export default function (options) {
|
|||
});
|
||||
}
|
||||
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio'
|
||||
});
|
||||
if (audioFormat === 'flac' && appSettings.alwaysRemuxFlac()) {
|
||||
// force remux flac in fmp4. Clients not supporting this configuration should disable this option
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: 'mp4',
|
||||
AudioCodec: 'flac',
|
||||
Type: 'Audio'
|
||||
});
|
||||
} else if (audioFormat !== 'mp3' || !appSettings.alwaysRemuxMp3()) { // mp3 remux profile is already injected
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio'
|
||||
});
|
||||
}
|
||||
|
||||
// https://www.webmproject.org/about/faq/
|
||||
if (audioFormat === 'opus' || audioFormat === 'webma') {
|
||||
|
@ -794,7 +803,8 @@ export default function (options) {
|
|||
Protocol: 'hls',
|
||||
MaxAudioChannels: physicalAudioChannels.toString(),
|
||||
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames,
|
||||
EnableAudioVbrEncoding: !appSettings.disableVbrAudio()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,45 @@ class AppSettings {
|
|||
return toBoolean(this.get('enableHi10p'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Disable VBR audio encoding' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Disable VBR audio encoding' or undefined.
|
||||
* @return {boolean} 'Disable VBR audio encoding' state.
|
||||
*/
|
||||
disableVbrAudio(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('disableVbrAudio', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('disableVbrAudio'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Always remux FLAC audio files' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Always remux FLAC audio files' or undefined.
|
||||
* @return {boolean} 'Always remux FLAC audio files' state.
|
||||
*/
|
||||
alwaysRemuxFlac(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('alwaysRemuxFlac', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('alwaysRemuxFlac'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Always remux MP3 audio files' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Always remux MP3 audio files' or undefined.
|
||||
* @return {boolean} 'Always remux MP3 audio files' state.
|
||||
*/
|
||||
alwaysRemuxMp3(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('alwaysRemuxMp3', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('alwaysRemuxMp3'), false);
|
||||
}
|
||||
|
||||
set(name, value, userId) {
|
||||
const currentValue = this.get(name, userId);
|
||||
localStorage.setItem(this.#getKey(name, userId), value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue