Bugfx/kasm 2090 resizing issues (#23)

* KASM-2090 work around for incomplete webp images when there are lots of concurrent users on a single session. Unknown root cause, work around will in most cases keep the connection alive.
This commit is contained in:
mmcclaskey 2021-11-15 08:19:19 -05:00 committed by GitHub
parent 170cb81f6f
commit ce2cd26277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 15 deletions

View File

@ -410,10 +410,14 @@ export default class Display {
}
drawImage(img, x, y, w, h) {
if (img.width != w || img.height != h) {
this._drawCtx.drawImage(img, x, y, w, h);
} else {
this._drawCtx.drawImage(img, x, y);
try {
if (img.width != w || img.height != h) {
this._drawCtx.drawImage(img, x, y, w, h);
} else {
this._drawCtx.drawImage(img, x, y);
}
} catch (error) {
Log.Error('Invalid image recieved.'); //KASM-2090
}
this._damage(x, y, w, h);
}

View File

@ -245,16 +245,6 @@
<option value=2>Off</option>
</select>
</li>
<li>
<label for="noVNC_setting_jpeg_video_quality">JPEG Quality:</label>
<input id="noVNC_setting_jpeg_video_quality" type="range" min="0" max="9" value="5" onchange="noVNC_setting_jpeg_video_quality_output.value=value">
<output id="noVNC_setting_jpeg_video_quality_output">5</output>
</li>
<li>
<label for="noVNC_setting_webp_video_quality">WEBP Quality:</label>
<input id="noVNC_setting_webp_video_quality" type="range" min="0" max="9" value="5" onchange="noVNC_setting_webp_video_quality_output.value=value">
<output id="noVNC_setting_webp_video_quality_output">5</output>
</li>
<li style="display: none;">
<label for="noVNC_setting_quality">Quality:</label>
<input id="noVNC_setting_quality" type="range" min="0" max="9" value="6">
@ -280,6 +270,16 @@
<input id="noVNC_setting_framerate" type="number" min="1" max="120" value="30">
</li>
<li>
<label for="noVNC_setting_jpeg_video_quality">Video JPEG Quality:</label>
<input id="noVNC_setting_jpeg_video_quality" type="range" min="0" max="9" value="5" onchange="noVNC_setting_jpeg_video_quality_output.value=value">
<output id="noVNC_setting_jpeg_video_quality_output">5</output>
</li>
<li>
<label for="noVNC_setting_webp_video_quality">Video WEBP Quality:</label>
<input id="noVNC_setting_webp_video_quality" type="range" min="0" max="9" value="5" onchange="noVNC_setting_webp_video_quality_output.value=value">
<output id="noVNC_setting_webp_video_quality_output">5</output>
</li>
<li>
<label for="noVNC_setting_video_area">Video Area:</label>
<input id="noVNC_setting_video_area" type="range" min="0" max="100" value="65" onchange="noVNC_setting_video_area_output.value=value">
<output id="noVNC_setting_video_area_output">65</output>
@ -457,4 +457,4 @@
<div class="button keyboard handle"></div>
</div>
</body>
</html>
</html>