Skip to content

chore: update @moq/net to 0.4.6 and @moq/msf to 0.3.1 - #10

Open
pzanella wants to merge 1 commit into
chore/upgrade-moq-binariesfrom
chore/upgrade-moq-js
Open

pzanella wants to merge 1 commit into
chore/upgrade-moq-binariesfrom
chore/upgrade-moq-js

Conversation

@pzanella

Copy link
Copy Markdown
Owner

Depends on #9. Merge #8 and #9 first; this PR then moves to main.

What

  • @moq/net 0.3.5 → 0.4.6 (root and dashboard/), @moq/msf 0.2.2 → 0.3.1. patches/@moq__msf.patch is still needed.
  • sgai/ and dashboard/src/lib/monitor.js rewritten for the new 0.4 API.

Changes

  • Connections: Connection.connect({ url, publish, consume }) with Origin.Producers. sgai/transport.mjs has waitForBroadcast() and waitForAnnounced(), based on origin.request(path, { announced: true }).
  • Timeouts: a plain timer, not AbortSignal.any() + AbortSignal.timeout(). On Node 20 the combined signal could be garbage-collected before it fired, and the ad-break loop stopped at the second break (seen while testing).
  • Publisher: tracks are created up front with createTrack(). A new subscriber starts at the newest group from its first frame, so the manual copy of the current cycle's events from fix: send each SGAI ad-break cycle as one group #8 is removed.
  • Readers: track(name).subscribe(), with .ordered() to read frames (readFrameSequence() is gone).
  • The dashboard now negotiates moq-lite-06.

Tests

  • Local relay 0.17.8: 18/18 events. Late subscriber (joins after the first blackout event): 22/22 in 3 runs, the relay cache gives the current cycle from frame 0.
  • Podman, SGAI end to end: 12/12 events, Media Timeline, per-break ad broadcasts, blackout, %token%.
  • Dashboard in Chrome on SGAI: live over WebTransport (moq-lite-06), end-to-end latency ~290 ms.

The 0.4 API is new, so sgai/ and the dashboard are rewritten for it:

- Connections take an Origin.Producer to publish and one to consume.
  waitForBroadcast()/waitForAnnounced() wait with
  origin.request(path, { announced: true }), with a plain timer for the
  timeout: AbortSignal.any() with AbortSignal.timeout() could be
  garbage-collected on Node 20 and stop the ad-break loop.
- The publisher creates its tracks up front. A new subscriber starts at
  the newest group from its first frame, so the manual copy of the
  current cycle's events is removed.
- Readers use track(name).subscribe(), and .ordered() to read frames.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant