Skip to content

Fix silent module load failure in Chrome 86-93 due to missing VideoDecoder.isConfigSupported#2061

Open
YoongiKim wants to merge 1 commit into
novnc:masterfrom
YoongiKim:fix/webcodecs-isConfigSupported-guard
Open

Fix silent module load failure in Chrome 86-93 due to missing VideoDecoder.isConfigSupported#2061
YoongiKim wants to merge 1 commit into
novnc:masterfrom
YoongiKim:fix/webcodecs-isConfigSupported-guard

Conversation

@YoongiKim
Copy link
Copy Markdown

Summary

Fixes #2060

Chrome 86–93 shipped VideoDecoder as part of an origin trial but did not include VideoDecoder.isConfigSupported — that method was only added in Chrome 94. The existing guard in _checkWebCodecsH264DecodeSupport() checked for VideoDecoder in window but not for isConfigSupported on the constructor, causing a "is not a function" error at the top-level await call site. Because this happens during ES module evaluation, the entire module silently fails to load with no console error — just a blank page.

Change

// Before
if (!('VideoDecoder' in window)) {
    return false;
}

// After
if (!('VideoDecoder' in window) ||
    !('isConfigSupported' in VideoDecoder)) {
    return false;
}

This makes the function gracefully return false on browsers that have VideoDecoder but lack isConfigSupported, instead of throwing.

🤖 Generated with Claude Code

Chrome 86-93 shipped VideoDecoder as part of an origin trial but did not
include the isConfigSupported method (added in Chrome 94). Calling it
without checking its existence caused a silent module load failure.

Fixes novnc#2060

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_checkWebCodecsH264DecodeSupport() causes silent ES module load failure on Chrome 86–93

1 participant