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
This commit is contained in:
掌控-物质 2026-05-23 16:32:46 +08:00 committed by GitHub
parent 5c2025d5a6
commit 7834e66733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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