Summary
globals.js:66 references new Worker("./yuv.js") as a fallback when WebGL is unavailable, but yuv.js and yuv.wasm were removed from the repo and build output.
Details
The video rendering path in flutter/web/js/src/globals.js has two branches:
if (YUVCanvas.WebGLFrameSink.isAvailable()) {
// WebGL path — works
} else {
yuvWorker = new Worker("./yuv.js"); // fallback — 404
}
yuv.js was moved to flutter/web/v1/ in commit 41a20b5, then v1/ was deleted. The reference was never updated.
Impact
Low — WebGL is available in all modern browsers including headless Chromium (verified locally). This fallback path is effectively dead code. The test setup in globals.setup.ts mocks isAvailable() to return false, which would hit this path in unit tests but doesn't cause a runtime failure since Worker isn't instantiated in that context.
Suggested fix
Remove the dead non-WebGL branch entirely, or add an explicit error message if WebGL is truly unavailable.
Summary
globals.js:66referencesnew Worker("./yuv.js")as a fallback when WebGL is unavailable, butyuv.jsandyuv.wasmwere removed from the repo and build output.Details
The video rendering path in
flutter/web/js/src/globals.jshas two branches:yuv.jswas moved toflutter/web/v1/in commit 41a20b5, thenv1/was deleted. The reference was never updated.Impact
Low — WebGL is available in all modern browsers including headless Chromium (verified locally). This fallback path is effectively dead code. The test setup in
globals.setup.tsmocksisAvailable()to returnfalse, which would hit this path in unit tests but doesn't cause a runtime failure since Worker isn't instantiated in that context.Suggested fix
Remove the dead non-WebGL branch entirely, or add an explicit error message if WebGL is truly unavailable.