mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5901 from gnattu/safari-hi10p
This commit is contained in:
commit
c80e0fde0c
5 changed files with 48 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import appSettings from '../../scripts/settings/appSettings';
|
import appSettings from '../../scripts/settings/appSettings';
|
||||||
import { appHost } from '../apphost';
|
import { appHost } from '../apphost';
|
||||||
|
import browser from '../../scripts/browser';
|
||||||
import focusManager from '../focusManager';
|
import focusManager from '../focusManager';
|
||||||
import qualityoptions from '../qualityOptions';
|
import qualityoptions from '../qualityOptions';
|
||||||
import globalize from '../../lib/globalize';
|
import globalize from '../../lib/globalize';
|
||||||
|
@ -143,6 +144,10 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
||||||
|
|
||||||
showHideQualityFields(context, user, apiClient);
|
showHideQualityFields(context, user, apiClient);
|
||||||
|
|
||||||
|
if (browser.safari) {
|
||||||
|
context.querySelector('.fldEnableHi10p').classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
context.querySelector('#selectAllowedAudioChannels').value = userSettings.allowedAudioChannels();
|
context.querySelector('#selectAllowedAudioChannels').value = userSettings.allowedAudioChannels();
|
||||||
|
|
||||||
apiClient.getCultures().then(allCultures => {
|
apiClient.getCultures().then(allCultures => {
|
||||||
|
@ -175,6 +180,7 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
||||||
context.querySelector('.chkPreferFmp4HlsContainer').checked = userSettings.preferFmp4HlsContainer();
|
context.querySelector('.chkPreferFmp4HlsContainer').checked = userSettings.preferFmp4HlsContainer();
|
||||||
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('.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();
|
||||||
|
@ -225,6 +231,8 @@ function saveUser(context, user, userSettingsInstance, apiClient) {
|
||||||
appSettings.enableDts(context.querySelector('.chkEnableDts').checked);
|
appSettings.enableDts(context.querySelector('.chkEnableDts').checked);
|
||||||
appSettings.enableTrueHd(context.querySelector('.chkEnableTrueHd').checked);
|
appSettings.enableTrueHd(context.querySelector('.chkEnableTrueHd').checked);
|
||||||
|
|
||||||
|
appSettings.enableHi10p(context.querySelector('.chkEnableHi10p').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');
|
||||||
|
|
|
@ -180,6 +180,14 @@
|
||||||
<div class="fieldDescription checkboxFieldDescription">${EnableTrueHdHelp}</div>
|
<div class="fieldDescription checkboxFieldDescription">${EnableTrueHdHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription fldEnableHi10p hide">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" class="chkEnableHi10p" />
|
||||||
|
<span>${EnableHi10p}</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">${EnableHi10pHelp}</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>
|
||||||
|
|
|
@ -1317,6 +1317,23 @@ export default function (options) {
|
||||||
profile.CodecProfiles.push(codecProfileMp4);
|
profile.CodecProfiles.push(codecProfileMp4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (browser.safari && appSettings.enableHi10p()) {
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'Video',
|
||||||
|
Container: 'hls',
|
||||||
|
SubContainer: 'mp4',
|
||||||
|
Codec: 'h264',
|
||||||
|
Conditions: [
|
||||||
|
{
|
||||||
|
Condition: 'EqualsAny',
|
||||||
|
Property: 'VideoProfile',
|
||||||
|
Value: h264Profiles + '|high 10',
|
||||||
|
IsRequired: false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
Codec: 'h264',
|
Codec: 'h264',
|
||||||
|
|
|
@ -182,6 +182,19 @@ class AppSettings {
|
||||||
return toBoolean(this.get('enableTrueHd'), false);
|
return toBoolean(this.get('enableTrueHd'), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get or set 'Enable H.264 High 10 Profile' state.
|
||||||
|
* @param {boolean|undefined} val - Flag to enable 'Enable H.264 High 10 Profile' or undefined.
|
||||||
|
* @return {boolean} 'Enable H.264 High 10 Profile' state.
|
||||||
|
*/
|
||||||
|
enableHi10p(val) {
|
||||||
|
if (val !== undefined) {
|
||||||
|
return this.set('enableHi10p', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return toBoolean(this.get('enableHi10p'), 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);
|
||||||
|
|
|
@ -263,6 +263,8 @@
|
||||||
"EnableFasterAnimations": "Faster animations",
|
"EnableFasterAnimations": "Faster animations",
|
||||||
"EnableFasterAnimationsHelp": "Use faster animations and transitions.",
|
"EnableFasterAnimationsHelp": "Use faster animations and transitions.",
|
||||||
"EnableHardwareEncoding": "Enable hardware encoding",
|
"EnableHardwareEncoding": "Enable hardware encoding",
|
||||||
|
"EnableHi10p": "Enable H.264 High 10 Profile",
|
||||||
|
"EnableHi10pHelp": "Enable to avoid transcoding H.264 10-bit videos. Disable this option if the video displays blank frames.",
|
||||||
"EnableLibrary": "Enable the library",
|
"EnableLibrary": "Enable the library",
|
||||||
"EnableLibraryHelp": "Disabling the library will hide it from all user views.",
|
"EnableLibraryHelp": "Disabling the library will hide it from all user views.",
|
||||||
"EnableNextVideoInfoOverlay": "Show next video info during playback",
|
"EnableNextVideoInfoOverlay": "Show next video info during playback",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue