Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local development. #87

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dev
# Local Development

This is a collection of helpful scripts for local development ONLY.
This is a collection of helpful scripts for local development.

## Setup

Expand Down Expand Up @@ -70,6 +70,10 @@ This listens for WebTransport connections on WebTransport `https://localhost:444
./dev/relay
```

It will print out a URL when you can use to publish. Alternatively, you can use `dev/pub` instead.

> Publish URL: https://quic.video/publish/?server=localhost:4443

### moq-pub

The following command runs a development instance, broadcasing `dev/source.mp4` to WebTransport `https://localhost:4443`:
Expand All @@ -78,6 +82,11 @@ The following command runs a development instance, broadcasing `dev/source.mp4`
./dev/pub
```

It will print out a URL when you can use to watch.
This will contain a random broadcast name so the below link won't work:

> Watch URL: https://quic.video/watch/REPLACE_WITH_NAME?server=localhost:4443

### moq-api

The following commands runs an API server, listening for HTTP requests on `http://localhost:4442` by default.
Expand Down
4 changes: 2 additions & 2 deletions dev/relay
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ ARGS=""

# Connect to the given URL to get origins.
# TODO default to a public instance?
if [ -n "$API" ]; then
if [ -n "${API-}" ]; then
ARGS="$ARGS --api $API"
fi

# Provide our node URL when registering origins.
if [ -n "$NODE" ]; then
if [ -n "${NODE-}" ]; then
ARGS="$ARGS --node $NODE"
fi

Expand Down