diff --git a/html5/js/Client.js b/html5/js/Client.js index bf847700..4f7f07f1 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -120,7 +120,7 @@ class XpraClient { this.PING_FREQUENCY = 5000; this.INFO_FREQUENCY = 1000; this.uuid = Utilities.getHexUUID(); - this.offscreen_api = DECODE_WORKER && XpraOffscreenWorker.isAvailable(); + this.offscreen_api = false; this.try_gpu = TRY_GPU_TRIGGER; this.init_encodings(); @@ -542,6 +542,7 @@ class XpraClient { this._do_connect(false); return; } + this.offscreen_api = DECODE_WORKER && XpraOffscreenWorker.isAvailable(this.ssl); this.clog("we have webworker support"); // spawn worker that checks for a websocket const worker = new Worker("js/lib/wsworker_check.js"); diff --git a/html5/js/OffscreenDecodeWorkerHelper.js b/html5/js/OffscreenDecodeWorkerHelper.js index 8ad75d4d..5f17f02d 100644 --- a/html5/js/OffscreenDecodeWorkerHelper.js +++ b/html5/js/OffscreenDecodeWorkerHelper.js @@ -33,16 +33,24 @@ const XpraOffscreenWorker = { return false; }, - isAvailable() { + isAvailable(ssl) { if (Utilities.isSafari() && !this.isSafariVersionSupported()) { + console.log("offscreen canvas is not supported with this version of Safari"); return false; } if (Utilities.isWebkit() && !Utilities.isChrome()) { + console.log("offscreen canvas is not supported with this webkit browser"); return false; } if (Utilities.isFirefox() && this.isFirefoxVersionSupported()) { + console.log("offscreen canvas is not supported with this version of Firefox"); + return false; + } + + if (Utilities.isChrome() && !ssl) { + console.log("offscreen canvas requires https with Chrome"); return false; }