From 7834e667335fe33cc8f95f5694764514437aa69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8E=8C=E6=8E=A7-=E7=89=A9=E8=B4=A8?= <60373614+zk-wz@users.noreply.github.com> Date: Sat, 23 May 2026 16:32:46 +0800 Subject: [PATCH] Workaround endless loading on Android Chrome Replace top-level await with then() in browser.js, due to a bug in chromium browsers. https://github.com/novnc/noVNC/pull/2053 --- core/util/browser.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/util/browser.js b/core/util/browser.js index 12f47a76..c613a7e9 100644 --- a/core/util/browser.js +++ b/core/util/browser.js @@ -182,7 +182,12 @@ async function _checkWebCodecsH264DecodeSupport() { return true; } -supportsWebCodecsH264Decode = await _checkWebCodecsH264DecodeSupport(); + +// FIXME: Avoid top-level await due to a Chromium bug where Decoder.flush() +// can hang indefinitely on some Android devices, blocking module evaluation. +_checkWebCodecsH264DecodeSupport().then((result) => { + supportsWebCodecsH264Decode = result; +}); /* * The functions for detection of platforms and browsers below are exported