mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add TrueHD enabling option
This commit is contained in:
parent
ce15adba69
commit
275e18457e
5 changed files with 26 additions and 1 deletions
|
@ -174,6 +174,7 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
|||
context.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
||||
context.querySelector('.chkPreferFmp4HlsContainer').checked = userSettings.preferFmp4HlsContainer();
|
||||
context.querySelector('.chkEnableDts').checked = appSettings.enableDts();
|
||||
context.querySelector('.chkEnableTrueHd').checked = appSettings.enableTrueHd();
|
||||
context.querySelector('.chkEnableCinemaMode').checked = userSettings.enableCinemaMode();
|
||||
context.querySelector('#selectAudioNormalization').value = userSettings.selectAudioNormalization();
|
||||
context.querySelector('.chkEnableNextVideoOverlay').checked = userSettings.enableNextVideoInfoOverlay();
|
||||
|
@ -218,6 +219,7 @@ function saveUser(context, user, userSettingsInstance, apiClient) {
|
|||
appSettings.limitSupportedVideoResolution(context.querySelector('.chkLimitSupportedVideoResolution').checked);
|
||||
|
||||
appSettings.enableDts(context.querySelector('.chkEnableDts').checked);
|
||||
appSettings.enableTrueHd(context.querySelector('.chkEnableTrueHd').checked);
|
||||
|
||||
setMaxBitrateFromField(context.querySelector('.selectVideoInNetworkQuality'), true, 'Video');
|
||||
setMaxBitrateFromField(context.querySelector('.selectVideoInternetQuality'), false, 'Video');
|
||||
|
|
|
@ -165,6 +165,14 @@
|
|||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${EnableDtsHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldEnableTrueHd">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkEnableTrueHd" />
|
||||
<span>${EnableTrueHd}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${EnableTrueHdHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||
|
|
|
@ -562,7 +562,7 @@ export default function (options) {
|
|||
videoAudioCodecs.push('pcm_s24le');
|
||||
}
|
||||
|
||||
if (options.supportsTrueHd) {
|
||||
if (appSettings.enableTrueHd() || options.supportsTrueHd) {
|
||||
videoAudioCodecs.push('truehd');
|
||||
}
|
||||
|
||||
|
|
|
@ -145,6 +145,19 @@ class AppSettings {
|
|||
return toBoolean(this.get('enableDts'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Enable TrueHD' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Enable TrueHD' or undefined.
|
||||
* @return {boolean} 'Enable TrueHD' state.
|
||||
*/
|
||||
enableTrueHd(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('enableTrueHd', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('enableTrueHd'), false);
|
||||
}
|
||||
|
||||
set(name, value, userId) {
|
||||
const currentValue = this.get(name, userId);
|
||||
localStorage.setItem(this.#getKey(name, userId), value);
|
||||
|
|
|
@ -269,6 +269,8 @@
|
|||
"EnableThemeSongsHelp": "Play the theme songs in background while browsing the library.",
|
||||
"EnableThemeVideosHelp": "Play theme videos in the background while browsing the library.",
|
||||
"EnableTonemapping": "Enable Tone mapping",
|
||||
"EnableTrueHd": "Enable TrueHD",
|
||||
"EnableTrueHdHelp": "Only enable if your device supports TrueHD or is connected to a compatible audio receiver, otherwise it may cause playback failure.",
|
||||
"EncoderPresetHelp": "Pick a faster value to improve performance, or a slower value to improve quality.",
|
||||
"Ended": "Ended",
|
||||
"EndsAtValue": "Ends at {0}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue