Hide lossless if not supported and tweak logo style (#61)

* Hide lossless if not supported and tweak logo style

Co-authored-by: ryan.kuba <ryan.kuba@kasmweb.com>
Co-authored-by: mattmcclaskey <matt@kasmweb.com>
This commit is contained in:
Ryan Kuba 2023-03-14 11:29:44 -07:00 committed by GitHub
parent f17512ee88
commit 866c2772f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 9 deletions

View File

@ -911,8 +911,8 @@ select:active {
text-shadow: 0.1em 0.1em 0 black; text-shadow: 0.1em 0.1em 0 black;
margin-bottom: 0px; margin-bottom: 0px;
background: white; background: white;
padding-top: 5px; padding: 5px;
padding-bottom: 5px; border-radius: 5px;
} }
.noVNC_logo img { .noVNC_logo img {
width: 45% width: 45%

View File

@ -135,6 +135,8 @@ const UI = {
.addEventListener('click', UI.hideStatus); .addEventListener('click', UI.hideStatus);
UI.openControlbar(); UI.openControlbar();
//
UI.updateVisualState('init'); UI.updateVisualState('init');
document.documentElement.classList.remove("noVNC_loading"); document.documentElement.classList.remove("noVNC_loading");
@ -197,6 +199,19 @@ const UI = {
UI.initSetting('logging', 'warn'); UI.initSetting('logging', 'warn');
UI.updateLogging(); UI.updateLogging();
// Stream Quality Presets
let qualityDropdown = document.getElementById("noVNC_setting_video_quality");
let supportsSharedArrayBuffers = typeof SharedArrayBuffer !== "undefined";
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:0,label:"Static"}))
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:1,label:"Low"}))
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:2,label:"Medium"}))
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:3,label:"High"}))
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:4,label:"Extreme"}))
if (supportsSharedArrayBuffers) {
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:5,label:"Lossless"}))
}
qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:10,label:"Custom"}))
// if port == 80 (or 443) then it won't be present and should be // if port == 80 (or 443) then it won't be present and should be
// set manually // set manually
let port = window.location.port; let port = window.location.port;

View File

@ -353,13 +353,6 @@
<li> <li>
<label for="noVNC_setting_video_quality">Preset Modes:</label> <label for="noVNC_setting_video_quality">Preset Modes:</label>
<select id="noVNC_setting_video_quality" name="vncVideoQuality"> <select id="noVNC_setting_video_quality" name="vncVideoQuality">
<option value=0>Static</option>
<option value=1>Low</option>
<option value=2>Medium</option>
<option value=3>High</option>
<option value=4>Extreme</option>
<option value=5>Lossless</option>
<option value=10>Custom</option>
</select> </select>
</li> </li>
<li> <li>