Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Usage
WebComponents cause some issues with tree-shaking.
If you're going to use the <moq-*> tags in your HTML, make sure your bundler is properly configured to not tree-shake them out.
UI
All of the components come with an optional UI element. This is not required, as you can build your own using the events/attributes, but it is a lot easier to get started with.
Unfortunately, we're using Shoelace which requires some extra work to install. The icons need to be hosted as part of your website. See the webpack.config for an example of how to do this.
Watch
Watch a single broadcast.
<!-- <moq-watch-ui> -->
<!-- </moq-watch-ui> -->
Notable attributes:
url: The URL of the Karp broadcast to watch. Anullvalue is useful for preloading the Worker+WASM. (default:null)paused: If non-null, the video will be paused. (default:null)latency: The target latency in milliseconds. (default:0)
Publish
Publish a single broadcast.
<!-- <moq-publish-ui> -->
<!-- </moq-publish-ui> -->
Notable attributes:
url: The URL of the Karp broadcast to watch. Anullvalue is useful for preloading the WASM. (default:null)device: The device to capture:"camera" | "screen" | "none" | null."none"will publish an empty broadcast, whilenullwill not publish anything. (default:null)preview: If non-null, the captured video will be rendered. (default:null)
Meet
Watch multiple broadcasts (in a grid) that match a prefix.
<!-- <moq-meet-ui> -->
<!-- </moq-meet-ui> -->
Notable attributes:
url: The URL of the meeting to watch. Any broadcast that starts with this prefix will be included. (default:null)
Video
An element that implements a subset of the HTMLVideoElement API. Useful with Media Chrome or existing video players.
This element is maintained on a best-effort.
If you want full functionality, use the <moq-watch> element.
Development
The package is a gross frankenstein of Rust+Typescript. To run the demo page:
If you're importing the @kixelated/moq package within your application, you can also test the package locally by linking.
This will create a symlink in node_modules which can cause some issues, but should work.
# Builds and runs `npm link`
# In your other package