Skip to content

feat(web): add direct Canvas rendering with preserved fallback frames - #31

Merged
fython merged 6 commits into
mainfrom
codex/pr30-canvas-fallback-fix
Oct 21, 2026
Merged

fython merged 6 commits into
mainfrom
codex/pr30-canvas-fallback-fix

Conversation

@fython

@fython fython commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Adds the three video rendering modes, explicit HEVC NAL framing, and CSP-compatible WebP probing from #30, preserving all original commits. Native Video remains the default; Direct Canvas is experimental and falls back to JPEG / WebP when unavailable or failing.

Fixes the review finding in Direct Canvas: a read/draw failure or unexpected stream end previously cleared the canvas before the receiver could capture its last frame. The error callback now runs before cleanup, preserving the frozen picture until the fallback image decodes. Generation checking prevents cleanup from stopping a renderer restarted by that callback.

Validation of the final tree:

  • 139 frontend tests passed, including regressions for snapshot preservation, image handoff, resource cleanup, and restart during the error callback.
  • npm run check, git diff --check, and npm run test:browser:media passed.
  • A focused real-Chromium reproduction confirms that the error callback can copy the displayed frame before cleanup.
  • Native conversion and RTP tests passed with ASan / UBSan during review of feat(web): add direct Canvas rendering and fix HEVC NAL framing #30; native code is unchanged by the follow-up fix.

Android build and emulator checks are delegated to this PR's CI; no new physical-device validation was performed.

seasonyuu and others added 6 commits October 21, 2026 15:31
Introduce renderer adapters, accessible mode selection and preference migration. Add no-Video rendering, JPEG fallback diagnostics, session isolation and regression coverage with localized documentation.
Declare the input framing at AirPlay decode entry points instead of guessing from start-code bytes. Cover AVC and HEVC length boundaries, keyframe detection, malformed records and byte-exact RTP roundtrips.
Document frame-rate measurements, bottleneck investigation, the NAL framing diagnosis and fixed-APK verification across all three renderers. Record restored device settings and remaining validation limits.
Use a temporary Blob URL for the WebP capability image and revoke it on completion. Run the real browser media regression against the Android CSP so blocked data URLs cannot silently disable WebP negotiation.
…dation

Describe JPEG and WebP image fallback with upstream retry and presentation state. Record merged checks, real HEVC playback and recovery, the CSP probe regression, final APK verification and restored device settings.
@fython
fython merged commit 66d0455 into main Oct 21, 2026
6 checks passed
@fython
fython deleted the codex/pr30-canvas-fallback-fix branch October 23, 2026 07:02
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.

2 participants