diff --git a/demo/vr/src/scene.ts b/demo/vr/src/scene.ts index 5ef567e2c82..00bc045a807 100644 --- a/demo/vr/src/scene.ts +++ b/demo/vr/src/scene.ts @@ -154,7 +154,8 @@ export class Scene { // Layout for the picture according to projection and stereo layout(projection?: Projection, stereo?: string) { this.#projection = projection; - this.#stereo = stereo && stereo in PACKING ? stereo : "mono"; + // An unknown packing, inherited names like "constructor" included, plays as mono. + this.#stereo = stereo && Object.hasOwn(PACKING, stereo) ? stereo : "mono"; this.#build(); } diff --git a/doc/bin/demo.md b/doc/bin/demo.md index e893d8c451e..7bba2a05e16 100644 --- a/doc/bin/demo.md +++ b/doc/bin/demo.md @@ -77,7 +77,8 @@ desktop tab. It lays a broadcast out by the catalog's [spatial fields](/concept/hang#catalog): an equirectangular `projection` wraps the picture on a sphere spanning its field of view, `stereo` crops each eye from a packed frame, and an `ambisonic` audio layout decodes the sound field -around the viewer's head. Without them it shows a flat screen with the sound +around the viewer's head, at first order: a higher order plays only its first +four channels. Without them it shows a flat screen with the sound coming from it. ```bash diff --git a/quest/m1/vr-demo-try.md b/quest/m1/vr-demo-try.md index 5c65cef0d0e..b059e90ce26 100644 --- a/quest/m1/vr-demo-try.md +++ b/quest/m1/vr-demo-try.md @@ -16,8 +16,11 @@ moq.dev with a looping VR180 broadcast once it plays well in a headset The harness (`just test vr`) proves the layout in headless Chromium on a desktop view only; a headset's per-eye render, recentre, and HRTF audio have had no human check. Run it with `just relay`, the `moq import fmp4` command in -`doc/bin/demo.md#vr`, and `just vr serve`, then open the page on the headset -(it needs a secure context, so serve it over HTTPS or tunnel to localhost). +`doc/bin/demo.md#vr`, and `just vr serve`, then open the page on the headset. +It needs a secure context, so serve it over HTTPS or tunnel it to the +headset's localhost, and make the relay reachable too: `localhost:4443` on the +headset is the headset itself, so forward that port as well or point the page +at the relay with `?url=`. ## Waiting diff --git a/test/vr/run.sh b/test/vr/run.sh index 62f6ce6ccbc..184e925772a 100755 --- a/test/vr/run.sh +++ b/test/vr/run.sh @@ -13,6 +13,9 @@ source "$DIR/../lib/harness.sh" harness_begin vr 'just test vr' cd "$WORKSPACE" cargo build --locked -p moq-relay -p moq-cli +# Staged at once, so a clean elsewhere during the setup below cannot remove them. +harness_stage bin/moq-relay "$WORKSPACE/target/debug/moq-relay" +harness_stage bin/moq "$WORKSPACE/target/debug/moq" uv run --no-project python sh/js/install.py frozen (cd demo/vr && bunx vite build --outDir "$HARNESS_RUN/vr-dist" --emptyOutDir) @@ -29,14 +32,14 @@ uv run --no-project python -I "$DIR/spherical.py" "$HARNESS_RUN/flat.mp4" "$HARN harness_port relay URL="http://127.0.0.1:$HARNESS_PORT" sed "s/4443/$HARNESS_PORT/g" "$DIR/relay.toml" >"$HARNESS_RUN/relay.toml" -harness_spawn relay "$HARNESS_RUN/relay.log" "$WORKSPACE/target/debug/moq-relay" "$HARNESS_RUN/relay.toml" +harness_spawn relay "$HARNESS_RUN/relay.log" "$HARNESS_RUN/bin/moq-relay" "$HARNESS_RUN/relay.toml" harness_ready "$URL/certificate.sha256" 30 "$HARNESS_PID" # ffmpeg carries st3d and sv3d into each fragmented init segment only past -strict unofficial. # shellcheck disable=SC2329 # invoked by harness_spawn publish_vr() { ffmpeg -hide_banner -loglevel error -re -stream_loop -1 -i "$HARNESS_RUN/vr180.mp4" -c copy -strict unofficial \ -movflags cmaf+frag_keyframe+empty_moov+default_base_moof -f mp4 - | - "$WORKSPACE/target/debug/moq" --connect "$URL" --connect-version moq-lite-07-wip --broadcast vr.hang import fmp4 + "$HARNESS_RUN/bin/moq" --connect "$URL" --connect-version moq-lite-07-wip --broadcast vr.hang import fmp4 } harness_spawn publisher "$HARNESS_RUN/publisher.log" publish_vr cd test/interop/clients/js