Installation
Package Information
- Version: 0.2.2
- License: MIT OR Apache-2.0
- Repository: github:moq-dev/moq
- Dependencies:
@moq/hang,@moq/lite,@moq/signals,@moq/ui-core
Web Component Usage
The easiest way to watch MoQ streams is using the<moq-watch> web component.
Web Component API
Attributes
| Attribute | Type | Description |
|---|---|---|
url | string | WebTransport URL of the MoQ relay |
fingerprint | string | URL to relay’s certificate fingerprint |
broadcast | string | Name of the broadcast to watch |
token | string | Optional JWT authentication token |
muted | boolean | Start muted (default: false) |
autoplay | boolean | Auto-play on load (default: true) |
controls | boolean | Show video controls (default: true) |
Properties
Methods
Events
JavaScript API
For more control, use the JavaScript API directly:Broadcast API
Video API
Audio API
Chat API
Complete Example
Here’s a complete HTML page:TypeScript Example
UI Customization
The watch component includes a Solid.js UI that can be customized:Browser Support
Requires:- WebTransport API (Chrome 97+, Edge 97+, Opera 83+)
- WebCodecs API (Chrome 94+, Edge 94+, Opera 80+)
Next Steps
@moq/publish
Publish streams to watch
@moq/hang
Learn about the media layer
@moq/ui-core
Customize the UI theme
@moq/lite
Use the low-level protocol API