Skip to content

Conversation

@sb2702
Copy link
Contributor

@sb2702 sb2702 commented Jan 17, 2026

@moq/lite works in server JS/TS environments like Node, Bun, Deno but needs some additional setup for Node. Adding some extra docs and a link to an example for server-side usage of @moq/lite

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

Walkthrough

The README for @moq/lite is revised: the introductory description is rewritten to clarify it as a TypeScript MoQ client for browser and server JS/TS environments and to state moq-lite handles real-time data delivery to/from relays. A Server-side usage section is added, documenting WebTransport unavailability in Node.js, defaulting to WebSockets, and providing WebSocket polyfill instructions plus optional experimental WebTransport polyfill setup. Examples are reorganized (Discovery replaced with Server side usage) while Quick Start is retained. Net changes: +36/−4 lines.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: updating @moq/lite documentation with server-side usage information.
Description check ✅ Passed The description clearly explains the motivation and scope of changes: adding server-side documentation for @moq/lite in Node, Bun, and Deno environments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@js/lite/README.md`:
- Around line 29-33: Replace the unhyphenated heading and occurrences of the
phrase "Server side usage" with the compound adjective "Server-side usage" for
grammar and consistency; update the section heading "Server side usage" and any
example/list item instances (e.g., the occurrence around line showing the
examples and the one at line 64) so they read "Server-side usage".
- Around line 31-33: Update the README wording around WebSocket support so it
distinguishes client vs server support in Node: mention that WebTransport is
unavailable in Node/Bun/Deno server environments so `@moq/lite` falls back to
WebSockets; state that Deno and Bun have built-in client and server WebSocket
support, while Node v21+ includes a built-in WebSocket client API but does not
include a built-in WebSocket server—so Node users need the ws package for
server-side WebSocket functionality (but not for client usage in v21+). Ensure
you reference `@moq/lite`, WebTransport, WebSockets, and the ws package in the
updated sentence.
- Line 64: The example description is incorrect: update the text for the "Server
side usage" link (the line showing **[Server side
usage](https://github.com/sb2702/webcodecs-examples/tree/main/src/moq-server)**)
to accurately describe the repo purpose, e.g., change "Publish from browser to a
server" to "Stream encoded video from server to browser" (or similar wording) so
it reflects server-to-browser streaming.
🧹 Nitpick comments (1)
js/lite/README.md (1)

50-53: Use globalThis for cross‑runtime consistency.

Prefer globalThis.WebTransport = WebTransport; to align with the earlier snippet and keep the example valid across Node/Bun/Deno.

♻️ Suggested tweak
-import { WebTransport, quicheLoaded } from '@fails-components/webtransport';
-global.WebTransport = WebTransport;
+import { WebTransport, quicheLoaded } from '@fails-components/webtransport';
+globalThis.WebTransport = WebTransport;

@kixelated kixelated merged commit 54755cd into moq-dev:main Jan 18, 2026
1 check passed
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.

2 participants