Update moq api#269
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MoQ documentation to describe and demonstrate using “connection URLs” (relay URL with embedded JWT) instead of manually handling raw publisher/subscriber tokens.
Changes:
- Update MoQ web + React Native publishing/subscribing tutorials to request and use a
connection_url. - Update MoQ explanation docs to describe obtaining “connection URLs” via Sandbox API and Server SDKs.
- Rename referenced SDK methods in examples (e.g.,
createMoqToken→createMoqAccess,getSandboxMoq*Token→getSandboxMoq*Access) and update example code accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| versioned_docs/version-0.28.0/tutorials/moq/web-subscribing.mdx | Updates sandbox + production subscribing examples to use “connection URL” flows. |
| versioned_docs/version-0.28.0/tutorials/moq/web-publishing.mdx | Updates sandbox + production publishing examples to use “connection URL” flows. |
| versioned_docs/version-0.28.0/tutorials/moq/react-native-subscribing.mdx | Updates React Native subscribing examples to use “connection URL” flows. |
| versioned_docs/version-0.28.0/tutorials/moq/react-native-publishing.mdx | Updates React Native publishing examples to use “connection URL” flows. |
| versioned_docs/version-0.28.0/explanation/moq-with-fishjam.mdx | Reframes token acquisition section around “connection URLs” and updates referenced SDK method names. |
| docs/tutorials/moq/web-subscribing.mdx | Same as the versioned tutorial: move to “connection URL” flows. |
| docs/tutorials/moq/web-publishing.mdx | Same as the versioned tutorial: move to “connection URL” flows. |
| docs/tutorials/moq/react-native-subscribing.mdx | Same as the versioned tutorial: move to “connection URL” flows. |
| docs/tutorials/moq/react-native-publishing.mdx | Same as the versioned tutorial: move to “connection URL” flows. |
| docs/explanation/moq-with-fishjam.mdx | Same as the versioned explanation: reframes token acquisition around “connection URLs”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+50
to
+55
| const { getSandboxMoqSubscriberAccess } = useSandbox({ | ||
| sandboxApiUrl: SANDBOX_API_URL, | ||
| }); | ||
|
|
||
| // Request a subscriber token scoped to the subscriber path | ||
| const subscribeToken = await getSandboxMoqSubscriberToken(SUBSCRIBER_PATH); | ||
| // Request a subscriber connection URL scoped to the subscriber path | ||
| const { connection_url: subscribeUrl } = await getSandboxMoqSubscriberAccess(SUBSCRIBER_PATH); |
Comment on lines
+181
to
184
| // Generate a connection URL that allows subscribing to 'stream-alice' | ||
| const { connection_url: subscribeUrl } = await fishjamClient.createMoqAccess({ | ||
| subscribePath: streamPath, | ||
| }); |
Comment on lines
+50
to
+55
| const { getSandboxMoqPublisherAccess } = useSandbox({ | ||
| sandboxApiUrl: SANDBOX_API_URL, | ||
| }); | ||
|
|
||
| // Request a publisher token scoped to the publisher path | ||
| const publishToken = await getSandboxMoqPublisherToken(PUBLISHER_PATH); | ||
| // Request a publisher connection URL scoped to the publisher path | ||
| const { connection_url: publishUrl } = await getSandboxMoqPublisherAccess(PUBLISHER_PATH); |
Comment on lines
+144
to
147
| // Generate a connection URL that allows publishing to 'stream-alice' | ||
| const { connection_url: publishUrl } = await fishjamClient.createMoqAccess({ | ||
| publishPath: streamPath, | ||
| }); |
Comment on lines
+79
to
85
| const { getSandboxMoqSubscriberAccess } = useSandbox({ | ||
| sandboxApiUrl: SANDBOX_API_URL, | ||
| }); | ||
|
|
||
| // Request a subscriber token scoped to the subscriber path | ||
| const subscribeToken = await getSandboxMoqSubscriberToken(SUBSCRIBER_PATH); | ||
| // Request a subscriber connection URL scoped to the subscriber path | ||
| const { connection_url: subscribeUrl } = await getSandboxMoqSubscriberAccess(SUBSCRIBER_PATH); | ||
| ``` |
Comment on lines
+214
to
217
| // Generate a connection URL that allows subscribing to 'stream-alice' | ||
| const { connection_url: subscribeUrl } = await fishjamClient.createMoqAccess({ | ||
| subscribePath: streamPath, | ||
| }); |
Comment on lines
+71
to
77
| const { getSandboxMoqPublisherAccess } = useSandbox({ | ||
| sandboxApiUrl: SANDBOX_API_URL, | ||
| }); | ||
|
|
||
| // Request a publisher token scoped to the publisher path | ||
| const publishToken = await getSandboxMoqPublisherToken(PUBLISHER_PATH); | ||
| // Request a publisher connection URL scoped to the publisher path | ||
| const { connection_url: publishUrl } = await getSandboxMoqPublisherAccess(PUBLISHER_PATH); | ||
| ``` |
Comment on lines
+190
to
193
| // Generate a connection URL that allows publishing to 'stream-alice' | ||
| const { connection_url: publishUrl } = await fishjamClient.createMoqAccess({ | ||
| publishPath: streamPath, | ||
| }); |
Comment on lines
+125
to
+126
| Each returns a JSON object with a `connection_url` field — the relay URL with the JWT embedded as `?jwt=` — alongside the raw `token`. | ||
|
|
Comment on lines
+133
to
+136
| The SDK's `createMoqAccess` method accepts either a `publishPath` or a `subscribePath` and returns the MoQ access details — a `connection_url` (the relay URL with the JWT embedded) alongside the raw `token`: | ||
|
|
||
| - `publishPath` — issues a publisher token scoped to that path. | ||
| - `subscribePath` — issues a subscriber token scoped to that path or namespace prefix. | ||
| - `publishPath` — returns a publisher connection URL scoped to that path. | ||
| - `subscribePath` — returns a subscriber connection URL scoped to that path or namespace prefix. |
czerwiukk
reviewed
Jun 23, 2026
AHGIJMKLKKZNPJKQR
approved these changes
Jun 23, 2026
9d8f493 to
16b104e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.