Quick Start
We've got a few demos to show off some basic MoQ goodness. Everything runs on localhost in development, but in production you'll want to split the components across multiple hosts.
Option 1: Using Nix (Recommended)
The recommended approach is to use Nix.
Give it a try! All dependencies are automatically downloaded, pinned to specific versions, and identical on CI and production.
Install the following:
Then run the demo:
# Runs the demo
nix develop -c just devWant to make it easier? Install nix-direnv, then you can simply run:
# Once only: automatically uses nix-shell inside the repository.
direnv allow
# Runs the demo
just devOption 2: Manual Installation
If you prefer not to use Nix (or are a Windows fiend), then you can manually install the dependencies:
Then run:
# Install additional dependencies, usually linters
just install
# Run the demo
just devWhen in doubt, check the Nix Flake for the full list of dependencies.
What's Happening?
The just dev command starts three components:
moq-relay: A server that routes live data between publishers and subscribers.hang-cli: A tool that publishes video content, in this case the classic "Big Buck Bunny".hang-demo: A web page with various demos, including a video player.
Once everything compiles, it should open https://localhost:5173 in your browser. See the development setup guide for more cool things you can do.
WARNING
The demo uses an insecure HTTP fetch for local development only. In production, you'll need a proper domain and TLS certificate via LetsEncrypt or similar.
What's Next?
If you want to run this stuff in production, you should have separate hosts for the three components.
moq-relaycan be run on any host(s) with a public IP address and an open UDP port.hang-clican be run by any publisher client.hang-democan be hosted on any web server or cloud provider.
Check out the full guide for deploying to production.