Skip to content

Commit

Permalink
Update RTMP code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Nov 8, 2023
1 parent 9a161b9 commit 18698b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import TabItem from '@theme/TabItem';
const resp = await call.get();
// user ID of an existing user
const userId = 'jane';
await client.upsertUsers({
users: {
[userId]: { id: userId },
},
});
const token = client.createToken(userId);

const address = resp.call.ingress.rtmp.address.replace(
Expand Down
5 changes: 5 additions & 0 deletions docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ This is how you can acquire the necessary information for publishing RTMP using
const resp = await call.getOrCreate({ data: { created_by_id: 'john' } });
// user ID of an existing user
const userId = 'jane';
await client.upsertUsers({
users: {
[userId]: { id: userId },
},
});
const token = client.createToken(userId);

const address = resp.call.ingress.rtmp.address.replace(
Expand Down

0 comments on commit 18698b8

Please sign in to comment.