Skip to content

feat(html): add MoQ live streaming support#1

Closed
kixelated wants to merge 2 commits into
mainfrom
moq-media
Closed

feat(html): add MoQ live streaming support#1
kixelated wants to merge 2 commits into
mainfrom
moq-media

Conversation

@kixelated
Copy link
Copy Markdown
Owner

Summary

  • Add <moq-canvas> element — WebCodecs-backed MoQ playback rendering to a <canvas> in shadow DOM
  • Add <moq-video> element — MSE-backed MoQ playback wrapping a native <video> via CustomMediaMixin
  • Each element uses explicit backends (Video.Decoder/Video.Renderer vs Mse.Muxer/Video.Mse) instead of MultiBackend for better tree-shaking
  • Connection, broadcast, and sync setup is inlined per element — no shared MoqMediaDelegate
  • FinalizationRegistry-based cleanup for all MoQ resources

Test plan

  • Verify <moq-canvas> plays a live MoQ stream (WebCodecs path)
  • Verify <moq-video> plays a live MoQ stream (MSE path)
  • Verify play/pause/mute controls work on both elements
  • Verify timeupdate, volumechange, and other media events fire correctly
  • Verify tree-shaking: canvas bundle excludes MSE code, video bundle excludes WebCodecs code

🤖 Generated with Claude Code

kixelated and others added 2 commits March 6, 2026 13:21
Add MoQ (Media over QUIC) playback via @moq/watch with two backends:
- `<moq-video>` — MSE backend using native <video> element
- `<moq-canvas>` — WebCodecs backend rendering to <canvas>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	packages/core/tsdown.config.ts
@luwes
Copy link
Copy Markdown

luwes commented Mar 6, 2026

Try to mimic this file for the core logic that can be shared between react and html. That's where the bulk of the media API should be.

https://github.com/videojs/v10/blob/04e98f4007dcc5957ff4b646482036da49e1efd4/packages/core/src/dom/media/hls/index.ts

@kixelated
Copy link
Copy Markdown
Owner Author

Moved to videojs#764

@kixelated kixelated closed this Mar 6, 2026
@kixelated
Copy link
Copy Markdown
Owner Author

Try to mimic this file for the core logic that can be shared between react and html. That's where the bulk of the media API should be.

https://github.com/videojs/v10/blob/04e98f4007dcc5957ff4b646482036da49e1efd4/packages/core/src/dom/media/hls/index.ts

Yep that was Claude's first attempt, and I steered it astray.

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