mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add DTS enabling option
This commit is contained in:
parent
58051dcd80
commit
ce15adba69
5 changed files with 27 additions and 1 deletions
|
@ -173,6 +173,7 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
||||||
|
|
||||||
context.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
context.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
||||||
context.querySelector('.chkPreferFmp4HlsContainer').checked = userSettings.preferFmp4HlsContainer();
|
context.querySelector('.chkPreferFmp4HlsContainer').checked = userSettings.preferFmp4HlsContainer();
|
||||||
|
context.querySelector('.chkEnableDts').checked = appSettings.enableDts();
|
||||||
context.querySelector('.chkEnableCinemaMode').checked = userSettings.enableCinemaMode();
|
context.querySelector('.chkEnableCinemaMode').checked = userSettings.enableCinemaMode();
|
||||||
context.querySelector('#selectAudioNormalization').value = userSettings.selectAudioNormalization();
|
context.querySelector('#selectAudioNormalization').value = userSettings.selectAudioNormalization();
|
||||||
context.querySelector('.chkEnableNextVideoOverlay').checked = userSettings.enableNextVideoInfoOverlay();
|
context.querySelector('.chkEnableNextVideoOverlay').checked = userSettings.enableNextVideoInfoOverlay();
|
||||||
|
@ -216,6 +217,8 @@ function saveUser(context, user, userSettingsInstance, apiClient) {
|
||||||
appSettings.maxVideoWidth(context.querySelector('.selectMaxVideoWidth').value);
|
appSettings.maxVideoWidth(context.querySelector('.selectMaxVideoWidth').value);
|
||||||
appSettings.limitSupportedVideoResolution(context.querySelector('.chkLimitSupportedVideoResolution').checked);
|
appSettings.limitSupportedVideoResolution(context.querySelector('.chkLimitSupportedVideoResolution').checked);
|
||||||
|
|
||||||
|
appSettings.enableDts(context.querySelector('.chkEnableDts').checked);
|
||||||
|
|
||||||
setMaxBitrateFromField(context.querySelector('.selectVideoInNetworkQuality'), true, 'Video');
|
setMaxBitrateFromField(context.querySelector('.selectVideoInNetworkQuality'), true, 'Video');
|
||||||
setMaxBitrateFromField(context.querySelector('.selectVideoInternetQuality'), false, 'Video');
|
setMaxBitrateFromField(context.querySelector('.selectVideoInternetQuality'), false, 'Video');
|
||||||
setMaxBitrateFromField(context.querySelector('.selectMusicInternetQuality'), false, 'Audio');
|
setMaxBitrateFromField(context.querySelector('.selectMusicInternetQuality'), false, 'Audio');
|
||||||
|
|
|
@ -157,6 +157,14 @@
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<select is="emby-select" class="selectSkipBackLength" label="${LabelSkipBackLength}"></select>
|
<select is="emby-select" class="selectSkipBackLength" label="${LabelSkipBackLength}"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription fldEnableDts">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" class="chkEnableDts" />
|
||||||
|
<span>${EnableDts}</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">${EnableDtsHelp}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||||
|
|
|
@ -547,7 +547,7 @@ export default function (options) {
|
||||||
hlsInFmp4VideoAudioCodecs.push('mp2');
|
hlsInFmp4VideoAudioCodecs.push('mp2');
|
||||||
}
|
}
|
||||||
|
|
||||||
let supportsDts = options.supportsDts;
|
let supportsDts = appSettings.enableDts() || options.supportsDts;
|
||||||
if (supportsDts == null) {
|
if (supportsDts == null) {
|
||||||
supportsDts = canPlayDts(videoTestElement);
|
supportsDts = canPlayDts(videoTestElement);
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,19 @@ class AppSettings {
|
||||||
return toBoolean(this.get('limitSupportedVideoResolution'), false);
|
return toBoolean(this.get('limitSupportedVideoResolution'), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get or set 'Enable DTS' state.
|
||||||
|
* @param {boolean|undefined} val - Flag to enable 'Enable DTS' or undefined.
|
||||||
|
* @return {boolean} 'Enable DTS' state.
|
||||||
|
*/
|
||||||
|
enableDts(val) {
|
||||||
|
if (val !== undefined) {
|
||||||
|
return this.set('enableDts', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return toBoolean(this.get('enableDts'), false);
|
||||||
|
}
|
||||||
|
|
||||||
set(name, value, userId) {
|
set(name, value, userId) {
|
||||||
const currentValue = this.get(name, userId);
|
const currentValue = this.get(name, userId);
|
||||||
localStorage.setItem(this.#getKey(name, userId), value);
|
localStorage.setItem(this.#getKey(name, userId), value);
|
||||||
|
|
|
@ -246,6 +246,8 @@
|
||||||
"EnableDetailsBanner": "Details Banner",
|
"EnableDetailsBanner": "Details Banner",
|
||||||
"EnableDetailsBannerHelp": "Display a banner image at the top of the item details page.",
|
"EnableDetailsBannerHelp": "Display a banner image at the top of the item details page.",
|
||||||
"EnableDisplayMirroring": "Display mirroring",
|
"EnableDisplayMirroring": "Display mirroring",
|
||||||
|
"EnableDts": "Enable DTS (DCA)",
|
||||||
|
"EnableDtsHelp": "Only enable if your device supports DTS or is connected to a compatible audio receiver, otherwise it may cause playback failure.",
|
||||||
"EnableExternalVideoPlayers": "External video players",
|
"EnableExternalVideoPlayers": "External video players",
|
||||||
"EnableExternalVideoPlayersHelp": "An external player menu will be shown when starting video playback.",
|
"EnableExternalVideoPlayersHelp": "An external player menu will be shown when starting video playback.",
|
||||||
"EnableFasterAnimations": "Faster animations",
|
"EnableFasterAnimations": "Faster animations",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue