1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

implement select menu for chromecast version

This commit is contained in:
dkanada 2020-05-17 00:36:10 +09:00
parent f45a4d1a8c
commit 0f7a79caab
5 changed files with 38 additions and 2 deletions

View file

@ -54,7 +54,13 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
// production version registered with google
// replace this value if you want to test changes on another instance
var applicationID = 'F007D354';
var applicationStable = 'F007D354';
var applicationNightly = '6F511C87';
var applicationID = applicationStable;
if (userSettings.chromecastVersion === 'nightly') {
applicationID = applicationNightly;
}
var messageNamespace = 'urn:x-cast:com.connectsdk';

View file

@ -204,6 +204,9 @@ define(['require', 'browser', 'appSettings', 'apphost', 'focusManager', 'quality
fillChromecastQuality(context.querySelector('.selectChromecastVideoQuality'));
var selectChromecastVersion = context.querySelector('.selectChromecastVersion');
selectChromecastVersion.value = userSettings.chromecastVersion();
var selectSkipForwardLength = context.querySelector('.selectSkipForwardLength');
fillSkipLengths(selectSkipForwardLength);
selectSkipForwardLength.value = userSettings.skipForwardLength();
@ -234,6 +237,7 @@ define(['require', 'browser', 'appSettings', 'apphost', 'focusManager', 'quality
userSettingsInstance.enableCinemaMode(context.querySelector('.chkEnableCinemaMode').checked);
userSettingsInstance.enableNextVideoInfoOverlay(context.querySelector('.chkEnableNextVideoOverlay').checked);
userSettingsInstance.chromecastVersion(context.querySelector('.selectChromecastVersion').value);
userSettingsInstance.skipForwardLength(context.querySelector('.selectSkipForwardLength').value);
userSettingsInstance.skipBackLength(context.querySelector('.selectSkipBackLength').value);

View file

@ -1,12 +1,13 @@
<form style="margin: 0 auto;">
<div class="verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle">
${HeaderAudioSettings}
</h2>
<div class="selectContainer">
<select is="emby-select" id="selectAudioLanguage" label="${LabelAudioLanguagePreference}"></select>
</div>
<label class="checkboxContainer">
<input type="checkbox" is="emby-checkbox" class="chkPlayDefaultAudioTrack" />
<span>${LabelPlayDefaultAudioTrack}</span>
@ -18,12 +19,15 @@
<h2 class="sectionTitle">
${HeaderVideoQuality}
</h2>
<div class="selectContainer fldVideoInNetworkQuality hide">
<select is="emby-select" class="selectVideoInNetworkQuality" label="${LabelHomeNetworkQuality}"></select>
</div>
<div class="selectContainer fldVideoInternetQuality hide">
<select is="emby-select" class="selectVideoInternetQuality" label="${LabelInternetQuality}"></select>
</div>
<div class="selectContainer fldChromecastQuality hide">
<select is="emby-select" class="selectChromecastVideoQuality" label="${LabelMaxChromecastBitrate}"></select>
</div>
@ -33,6 +37,7 @@
<h2>
${HeaderMusicQuality}
</h2>
<div class="selectContainer">
<select is="emby-select" class="selectMusicInternetQuality" label="${LabelInternetQuality}"></select>
</div>
@ -43,6 +48,7 @@
<h2 class="sectionTitle">
${TabAdvanced}
</h2>
<div class="checkboxContainer checkboxContainer-withDescription cinemaModeOptions">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnableCinemaMode" />
@ -50,12 +56,14 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${CinemaModeConfigurationHelp}</div>
</div>
<div class="checkboxContainer fldEpisodeAutoPlay hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEpisodeAutoPlay" />
<span>${PlayNextEpisodeAutomatically}</span>
</label>
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldEnableNextVideoOverlay hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnableNextVideoOverlay" />
@ -74,6 +82,13 @@
</div>
</div>
<div class="selectContainer">
<select is="emby-select" class="selectChromecastVersion" label="${LabelChromecastVersion}">
<option value="stable">${LabelStable}</option>
<option value="nightly">${LabelNightly}</option>
</select>
</div>
<div class="selectContainer">
<select is="emby-select" class="selectSkipForwardLength" label="${LabelSkipForwardLength}"></select>
</div>

View file

@ -153,6 +153,14 @@ import events from 'events';
return this.get('datetimelocale', false);
}
export function chromecastVersion(val) {
if (val !== undefined) {
return this.set('chromecastVersion', val.toString());
}
return this.get('chromecastVersion') || 'stable';
}
export function skipBackLength(val) {
if (val !== undefined) {
return this.set('skipBackLength', val.toString());

View file

@ -748,6 +748,9 @@
"LabelMusicStreamingTranscodingBitrate": "Music transcoding bitrate:",
"LabelMusicStreamingTranscodingBitrateHelp": "Specify a max bitrate when streaming music.",
"LabelName": "Name:",
"LabelChromecastVersion": "Chromecast Version",
"LabelStable": "Stable",
"LabelNightly": "Nightly",
"LabelNewName": "New name:",
"LabelNewPassword": "New password:",
"LabelNewPasswordConfirm": "New password confirm:",