From 18698b84bb5179512ed310d41930b642bc35fbe3 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Wed, 8 Nov 2023 14:51:05 +0100 Subject: [PATCH] Update RTMP code snippets --- docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx | 5 +++++ docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx b/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx index 18a8d6f2..b9c0fde4 100644 --- a/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx +++ b/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx @@ -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( diff --git a/docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx b/docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx index 99468cb4..40bc130b 100644 --- a/docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx +++ b/docusaurus/video/docusaurus/docs/api/streaming/rtmp.mdx @@ -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(