mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge 2e3883df9c
into 7d84185d0e
This commit is contained in:
commit
65d0b49edc
5 changed files with 38 additions and 4 deletions
|
@ -190,6 +190,11 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
||||||
context.querySelector('.fldEnableHi10p').classList.remove('hide');
|
context.querySelector('.fldEnableHi10p').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show hls segment length setting for webOS only, as the setting only aims to fix an issue on that platform.
|
||||||
|
if (browser.web0s) {
|
||||||
|
context.querySelector('.fldLimitSegmentLength').classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
context.querySelector('#selectAllowedAudioChannels').value = userSettings.allowedAudioChannels();
|
context.querySelector('#selectAllowedAudioChannels').value = userSettings.allowedAudioChannels();
|
||||||
|
|
||||||
apiClient.getCultures().then(allCultures => {
|
apiClient.getCultures().then(allCultures => {
|
||||||
|
@ -220,6 +225,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('.chkLimitSegmentLength').checked = userSettings.limitSegmentLength();
|
||||||
context.querySelector('.chkEnableDts').checked = appSettings.enableDts();
|
context.querySelector('.chkEnableDts').checked = appSettings.enableDts();
|
||||||
context.querySelector('.chkEnableTrueHd').checked = appSettings.enableTrueHd();
|
context.querySelector('.chkEnableTrueHd').checked = appSettings.enableTrueHd();
|
||||||
context.querySelector('.chkEnableHi10p').checked = appSettings.enableHi10p();
|
context.querySelector('.chkEnableHi10p').checked = appSettings.enableHi10p();
|
||||||
|
@ -293,6 +299,7 @@ function saveUser(context, user, userSettingsInstance, apiClient) {
|
||||||
user.Configuration.PlayDefaultAudioTrack = context.querySelector('.chkPlayDefaultAudioTrack').checked;
|
user.Configuration.PlayDefaultAudioTrack = context.querySelector('.chkPlayDefaultAudioTrack').checked;
|
||||||
user.Configuration.EnableNextEpisodeAutoPlay = context.querySelector('.chkEpisodeAutoPlay').checked;
|
user.Configuration.EnableNextEpisodeAutoPlay = context.querySelector('.chkEpisodeAutoPlay').checked;
|
||||||
userSettingsInstance.preferFmp4HlsContainer(context.querySelector('.chkPreferFmp4HlsContainer').checked);
|
userSettingsInstance.preferFmp4HlsContainer(context.querySelector('.chkPreferFmp4HlsContainer').checked);
|
||||||
|
userSettingsInstance.limitSegmentLength(context.querySelector('.chkLimitSegmentLength').checked);
|
||||||
userSettingsInstance.enableCinemaMode(context.querySelector('.chkEnableCinemaMode').checked);
|
userSettingsInstance.enableCinemaMode(context.querySelector('.chkEnableCinemaMode').checked);
|
||||||
userSettingsInstance.selectAudioNormalization(context.querySelector('#selectAudioNormalization').value);
|
userSettingsInstance.selectAudioNormalization(context.querySelector('#selectAudioNormalization').value);
|
||||||
userSettingsInstance.enableNextVideoInfoOverlay(context.querySelector('.chkEnableNextVideoOverlay').checked);
|
userSettingsInstance.enableNextVideoInfoOverlay(context.querySelector('.chkEnableNextVideoOverlay').checked);
|
||||||
|
|
|
@ -190,6 +190,14 @@
|
||||||
<div class="fieldDescription checkboxFieldDescription">${EnableHi10pHelp}</div>
|
<div class="fieldDescription checkboxFieldDescription">${EnableHi10pHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription fldLimitSegmentLength hide">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" class="chkLimitSegmentLength" />
|
||||||
|
<span>${LimitSegmentLength}</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">${LimitSegmentLengthHelp}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<select is="emby-select" id="selectPreferredTranscodeVideoCodec" label="${LabelSelectPreferredTranscodeVideoCodec}">
|
<select is="emby-select" id="selectPreferredTranscodeVideoCodec" label="${LabelSelectPreferredTranscodeVideoCodec}">
|
||||||
<option value="">${Auto}</option>
|
<option value="">${Auto}</option>
|
||||||
|
|
|
@ -864,6 +864,7 @@ export default function (options) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canPlayHls() && options.enableHls !== false) {
|
if (canPlayHls() && options.enableHls !== false) {
|
||||||
|
const enableLimitedSegmentLength = userSettings.limitSegmentLength();
|
||||||
if (hlsInFmp4VideoCodecs.length && hlsInFmp4VideoAudioCodecs.length && enableFmp4Hls) {
|
if (hlsInFmp4VideoCodecs.length && hlsInFmp4VideoAudioCodecs.length && enableFmp4Hls) {
|
||||||
// HACK: Since there is no filter for TS/MP4 in the API, specify HLS support in general and rely on retry after DirectPlay error
|
// HACK: Since there is no filter for TS/MP4 in the API, specify HLS support in general and rely on retry after DirectPlay error
|
||||||
// FIXME: Need support for {Container: 'mp4', Protocol: 'hls'} or {Container: 'hls', SubContainer: 'mp4'}
|
// FIXME: Need support for {Container: 'mp4', Protocol: 'hls'} or {Container: 'hls', SubContainer: 'mp4'}
|
||||||
|
@ -883,7 +884,8 @@ export default function (options) {
|
||||||
Protocol: 'hls',
|
Protocol: 'hls',
|
||||||
MaxAudioChannels: physicalAudioChannels.toString(),
|
MaxAudioChannels: physicalAudioChannels.toString(),
|
||||||
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
||||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames
|
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames,
|
||||||
|
SegmentLength: enableLimitedSegmentLength ? 1 : undefined
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -906,7 +908,8 @@ export default function (options) {
|
||||||
Protocol: 'hls',
|
Protocol: 'hls',
|
||||||
MaxAudioChannels: physicalAudioChannels.toString(),
|
MaxAudioChannels: physicalAudioChannels.toString(),
|
||||||
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
||||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames
|
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames,
|
||||||
|
SegmentLength: enableLimitedSegmentLength ? 1 : undefined
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,8 +152,8 @@ export class UserSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or set 'Perfer fMP4-HLS Container' state.
|
* Get or set 'Prefer fMP4-HLS Container' state.
|
||||||
* @param {boolean|undefined} val - Flag to enable 'Perfer fMP4-HLS Container' or undefined.
|
* @param {boolean|undefined} val - Flag to enable 'Prefer fMP4-HLS Container' or undefined.
|
||||||
* @return {boolean} 'Prefer fMP4-HLS Container' state.
|
* @return {boolean} 'Prefer fMP4-HLS Container' state.
|
||||||
*/
|
*/
|
||||||
preferFmp4HlsContainer(val) {
|
preferFmp4HlsContainer(val) {
|
||||||
|
@ -165,6 +165,19 @@ export class UserSettings {
|
||||||
return toBoolean(this.get('preferFmp4HlsContainer', false), browser.safari || browser.firefox || browser.chrome || browser.edgeChromium);
|
return toBoolean(this.get('preferFmp4HlsContainer', false), browser.safari || browser.firefox || browser.chrome || browser.edgeChromium);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get or set 'Limit Segment Length' state.
|
||||||
|
* @param {boolean|undefined} val - Flag to enable 'Limit Segment Length' or undefined.
|
||||||
|
* @returns {boolean} 'Limit Segment Length' state.
|
||||||
|
*/
|
||||||
|
limitSegmentLength(val) {
|
||||||
|
if (val !== undefined) {
|
||||||
|
return this.set('limitSegmentLength', val.toString(), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toBoolean(this.get('limitSegmentLength', false), false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or set 'Cinema Mode' state.
|
* Get or set 'Cinema Mode' state.
|
||||||
* @param {boolean|undefined} val - Flag to enable 'Cinema Mode' or undefined.
|
* @param {boolean|undefined} val - Flag to enable 'Cinema Mode' or undefined.
|
||||||
|
@ -671,6 +684,7 @@ export const get = currentSettings.get.bind(currentSettings);
|
||||||
export const serverConfig = currentSettings.serverConfig.bind(currentSettings);
|
export const serverConfig = currentSettings.serverConfig.bind(currentSettings);
|
||||||
export const allowedAudioChannels = currentSettings.allowedAudioChannels.bind(currentSettings);
|
export const allowedAudioChannels = currentSettings.allowedAudioChannels.bind(currentSettings);
|
||||||
export const preferFmp4HlsContainer = currentSettings.preferFmp4HlsContainer.bind(currentSettings);
|
export const preferFmp4HlsContainer = currentSettings.preferFmp4HlsContainer.bind(currentSettings);
|
||||||
|
export const limitSegmentLength = currentSettings.limitSegmentLength.bind(currentSettings);
|
||||||
export const enableCinemaMode = currentSettings.enableCinemaMode.bind(currentSettings);
|
export const enableCinemaMode = currentSettings.enableCinemaMode.bind(currentSettings);
|
||||||
export const selectAudioNormalization = currentSettings.selectAudioNormalization.bind(currentSettings);
|
export const selectAudioNormalization = currentSettings.selectAudioNormalization.bind(currentSettings);
|
||||||
export const enableNextVideoInfoOverlay = currentSettings.enableNextVideoInfoOverlay.bind(currentSettings);
|
export const enableNextVideoInfoOverlay = currentSettings.enableNextVideoInfoOverlay.bind(currentSettings);
|
||||||
|
|
|
@ -1022,6 +1022,8 @@
|
||||||
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
||||||
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Leaving this empty will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Leaving this empty will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
||||||
"LibraryInvalidItemIdError": "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem.",
|
"LibraryInvalidItemIdError": "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem.",
|
||||||
|
"LimitSegmentLength": "Use shorter HLS segments",
|
||||||
|
"LimitSegmentLengthHelp": "Enabling this option may help prevent the HLS player from hanging during seeking on certain devices, such as webOS TVs.",
|
||||||
"LimitSupportedVideoResolution": "Limit maximum supported video resolution",
|
"LimitSupportedVideoResolution": "Limit maximum supported video resolution",
|
||||||
"LimitSupportedVideoResolutionHelp": "Use 'Maximum Allowed Video Transcoding Resolution' as maximum supported video resolution.",
|
"LimitSupportedVideoResolutionHelp": "Use 'Maximum Allowed Video Transcoding Resolution' as maximum supported video resolution.",
|
||||||
"List": "List",
|
"List": "List",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue