From 345d3d228d796afabbc19e451fce6158ab0583a7 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 20 Sep 2024 17:56:44 +0700 Subject: [PATCH] offscreen toggle had no effect --- html5/js/Client.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/html5/js/Client.js b/html5/js/Client.js index 86b0d1d6..4e16c1cd 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -529,9 +529,12 @@ class XpraClient { this._do_connect(false); return; } - this.offscreen_api = DECODE_WORKER && XpraOffscreenWorker.isAvailable(this.ssl); if (this.offscreen_api) { - this.set_encoding_option('video_max_size',[4096, 4096]); + // check that it is actually available: + this.offscreen_api = DECODE_WORKER && XpraOffscreenWorker.isAvailable(this.ssl); + if (this.offscreen_api) { + this.set_encoding_option('video_max_size',[4096, 4096]); + } } this.clog("we have webworker support"); // spawn worker that checks for a websocket