diff --git a/assets/images/analytics/call-inspector.svg b/assets/images/analytics/call-inspector.svg new file mode 100644 index 000000000..66ac756d4 --- /dev/null +++ b/assets/images/analytics/call-inspector.svg @@ -0,0 +1 @@ +Need to inspect?StartUse Call SearchGet Call OverviewView Call Diagnosis (Beta)View Call DetailsGive your feedbackClick Call DetailsEndFound the root cause?NoYesNoACU < 50ACU ≥ 50Locate a user to inspectLocate a conclusion to inspectFound the call?YesYes \ No newline at end of file diff --git a/assets/images/analytics/exclaimaition.png b/assets/images/analytics/exclaimaition.png new file mode 100644 index 000000000..7a19e22b7 Binary files /dev/null and b/assets/images/analytics/exclaimaition.png differ diff --git a/assets/images/cloud-recording/composite-mode.svg b/assets/images/cloud-recording/composite-mode.svg new file mode 100644 index 000000000..16f3042a3 --- /dev/null +++ b/assets/images/cloud-recording/composite-mode.svg @@ -0,0 +1 @@ +Audio and video of all usersChannelUID 1UID 2One M3U8 fileMultipleTSfilesOne or more MP4 filesSet avFileTypeas [“his”, “mp4”] \ No newline at end of file diff --git a/assets/images/cloud-recording/composite-recording-example-diagram.svg b/assets/images/cloud-recording/composite-recording-example-diagram.svg deleted file mode 100644 index 93be79025..000000000 --- a/assets/images/cloud-recording/composite-recording-example-diagram.svg +++ /dev/null @@ -1 +0,0 @@ -
Channel
Channel
UID 1
UID 1
UID 2
UID 2

Audio and video of all users

<p><span>Audo and video of all users</span></p>

One M3U8 file

<p>One M3U8 file</p>

Multiple TS files

<p></p><p>Multiple TS files</p>

One or more MP4 files

<p></p><p>One or more MP4 files</p>
Set avFileType as ["hls","mp4"]
Set avFileType as ["hls","mp4"]
\ No newline at end of file diff --git a/assets/images/cloud-recording/individual-mode.svg b/assets/images/cloud-recording/individual-mode.svg new file mode 100644 index 000000000..f59d8a878 --- /dev/null +++ b/assets/images/cloud-recording/individual-mode.svg @@ -0,0 +1 @@ +UID 1 audio fileChannelUID 1UID 2M3U8 + Audio TS /WebMM3U8 + Video TS/WebMM3U8/MPD + Audio TS/WebM + Video TS/WebMM3U8 + Audio TS /WebMM3U8 + Video TS/WebMM3U8/MPD+ Audio TS/WebM+Video TS/WebMIndividual recording standard modeUID 1 video fileUID 1 merged audio and video fileUID 2 audio fileUID 2 video fileUID 2 merged audio and video file \ No newline at end of file diff --git a/assets/images/cloud-recording/web-page-layout.svg b/assets/images/cloud-recording/web-page-layout.svg new file mode 100644 index 000000000..bdadbc4ab --- /dev/null +++ b/assets/images/cloud-recording/web-page-layout.svg @@ -0,0 +1 @@ +Agora Video SDKWhiteboardThird-party whiteboard SDKVideo 1Video 2Chat windowWeb Page URLAgora Signaling SDK \ No newline at end of file diff --git a/assets/images/cloud-recording/web-page-push-cdn.svg b/assets/images/cloud-recording/web-page-push-cdn.svg new file mode 100644 index 000000000..8dd81cd74 --- /dev/null +++ b/assets/images/cloud-recording/web-page-push-cdn.svg @@ -0,0 +1 @@ +Records the audio and video on the web pageRecorded FileRESTful APIAgora Cloud Recording ServerYour app serverWeb Page URLThird-party cloud storageCDN1. Records the audio and video on the web page and coverts to media streams2. Pushes streams to the CDN \ No newline at end of file diff --git a/assets/images/cloud-recording/web-page-recording.svg b/assets/images/cloud-recording/web-page-recording.svg new file mode 100644 index 000000000..26d0e951a --- /dev/null +++ b/assets/images/cloud-recording/web-page-recording.svg @@ -0,0 +1 @@ +Records the audio and video on the web pageRecorded FileRESTful APIAgora Cloud Recording ServerYour app serverWeb Page URLThird-party cloud storage \ No newline at end of file diff --git a/assets/images/common/basic-audio-and-video.svg b/assets/images/common/basic-audio-and-video.svg index a6a82dc0a..3e0bb32a4 100644 --- a/assets/images/common/basic-audio-and-video.svg +++ b/assets/images/common/basic-audio-and-video.svg @@ -168,9 +168,9 @@ - - - + + + @@ -198,22 +198,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/cloud-recording/develop/composite-mode.md b/cloud-recording/develop/composite-mode.md index 33c95bc45..64228c056 100644 --- a/cloud-recording/develop/composite-mode.md +++ b/cloud-recording/develop/composite-mode.md @@ -17,7 +17,7 @@ In composite recording mode, the audio and video of multiple user IDs in a chann For example, if a channel has two users, and you choose to record both audio and video, Agora Cloud Recording generates files as shown in the following diagram: -![](/images/cloud-recording/composite-recording-example-diagram.svg) +![](/images/cloud-recording/composite-mode.svg) The recording service generates one M3U8 file and multiple TS files. If you set `avFileType` as `["hls","mp4"]` when calling the [`start`](../reference/restful-api#start) method, the recording service also generates MP4 files, which include the audio and video of all users in the channel. diff --git a/cloud-recording/develop/individual-mode.md b/cloud-recording/develop/individual-mode.md index 7b8fad19a..4d75d6039 100644 --- a/cloud-recording/develop/individual-mode.md +++ b/cloud-recording/develop/individual-mode.md @@ -26,8 +26,7 @@ Agora recommends that you use the standard mode when you start individual record For example, if a channel has two users and you choose to record both audio and video, the files generated for standard mode of individual recording is shown in the following diagram: - -![Image](/images/standard_mode.png) +![Image](/images/cloud-recording/individual-mode.svg) ## Implementation diff --git a/cloud-recording/develop/webpage-mode.md b/cloud-recording/develop/webpage-mode.md index 05d8c85d4..e3c50d542 100644 --- a/cloud-recording/develop/webpage-mode.md +++ b/cloud-recording/develop/webpage-mode.md @@ -7,8 +7,6 @@ description: Use the Cloud Recording RESTful API to make a web page recording and push media stream to the CDN during a web page recording. --- -## Overview - This guide includes the key steps in using the Cloud Recording RESTful API to make a web page recording. Agora Cloud Recording supports three recording modes: @@ -19,15 +17,15 @@ Agora Cloud Recording supports three recording modes: In web page recording mode, the content and audio of a specified web page are recorded in a single file. -![](https://web-cdn.agora.io/docs-files/1640248515342) +![](/images/cloud-recording/web-page-recording.svg) You can use web page recording to reproduce scenarios such as online classes and video conferences. For example, if your web application integrates both the Agora SDK and a third-party whiteboard SDK, web page recording can record everything on the web page instead of only the audio and video streams. -![](https://web-cdn.agora.io/docs-files/1640248552826) +![](/images/cloud-recording/web-page-layout.svg) In web page recording mode, you can also convert the content and audio of the page into a media stream and push it to the CDN during the recording process. -![](https://web-cdn.agora.io/docs-files/1640247686729) +![](/images/cloud-recording/web-page-push-cdn.svg) ## Prerequisites diff --git a/shared/agora-analytics/_call-search.mdx b/shared/agora-analytics/_call-search.mdx index 6af019815..5433862dc 100644 --- a/shared/agora-analytics/_call-search.mdx +++ b/shared/agora-analytics/_call-search.mdx @@ -1,48 +1,37 @@ import * as data from '@site/data/variables.js'; -## Introduction +The Call Inspector enables you to: -A new version of Call Inspector was released on May 5, 2022. This new version has the following advantages over the previous version: -- Locating user-specific issues through call-specific issues is more efficient, especially for large-scale calls. -- Key quality metrics and events now offer receiver's and sender's views, making it convenient to locate exceptions. -- Agora's auto-diagnosis engine is fully integrated to reduce the time cost of inspecting a call through intuitive conclusions. All features related to the auto-diagnosis engine are currently in beta. +- Find a call or a group of calls. +- Determine the overall call quality in a channel. +- Dive into user-specific metrics and events. +- Examine user experience issues. -
  • To help you transition smoothly, the new Call Inspector provides a one-click switch on the user interface so you can go back to the old version. This option is available until the old version goes offline, which is scheduled for May 19, 2022.
  • For calls started before April 19, 2022, the new Call Inspector is for reference only because it has higher requirements for data.
  • +The following workflow shows how to use Call Inspector features: -### Feature overview - -The new Call Inspector provides the following features: - -- Find a call or a group of calls. See [Use Call Search](#search). -- Determine the overall call quality in a channel. See [Get Call Overview](#overview). -- Dive into user-specific metrics and events. See [View Call Details](#details). -- Examine user experience issues. See [View Call Diagnosis (Beta)](#diagnosis). - -The following workflow shows how to use the Call Inspector features together: - -![1650428866646](https://web-cdn.agora.io/docs-files/1650428866646) - -### Enable Call Inspector +![call-inspector](/images/analytics/call-inspector.svg) + To enable Call Inspector, subscribe to an pricing plan. For details, see [Pricing](../../overview/pricing). + ## Use Call Search -On the Call Search page, you can apply multiple filters (including channel name, call duration, call freeze rates, and number of users) to search calls and view their basic information. +On the Call Search page, you can apply multiple filters such as channel name, call duration, call freeze rates, and number of users to search calls and view their basic information. ![Call Search](/images/analytics/call-search.png) To search calls, follow these steps: -1. Log in to and click **** > **Call Inspector** on the left navigation menu. -2. In the upper-left corner, select a project. You see all the available calls under the project. -3. Start a search through one of the following ways: +1. Log in to and click **** > **Call Inspector** in the left navigation menu. +2. In the upper-left corner, select a project. You see all the available calls under the project. +3. Start a search in one of the following ways: - Basic search: On the top of the page, select a time range, channel name or call ID, and call status. - Advanced search: Click **Advanced** in the upper right corner, add one or more filters as needed, and then click **Search**. -The accessible time range depends on the data retention policy for Call Inspector features in your [Pricing Plans](/agora-analytics/overview/pricing). +The accessible time range depends on the data retention policy for Call Inspector features in your [Pricing Plan](/agora-analytics/overview/pricing). ## Get Call Overview @@ -50,7 +39,7 @@ The Call Overview page is designed to help you quickly understand the overall si To enter the Call Overview page, follow these steps: -1. Subscribe to the Premium or Enterprise pricing plan. See [Subscribe to a plan](/agora-analytics/overview/pricing#subscribe-to-a-plan). Other pricing plans do not provide access to the Call Overview page. +1. [Subscribe](/agora-analytics/overview/pricing#subscribe-to-a-plan) to the Premium or Enterprise pricing plan. Other pricing plans do not provide access to the Call Overview page. 2. [Use Call Search](#search) to find the call you want to inspect, then click **Call Details** in the **Action** column. - If [the number of Accumulated Call Users (ACU)](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) is greater than or equal to 50, you enter the Call Overview page. - If the number of ACU is less than 50, you first enter the Call Details page. Click the **Call Overview** tab on the top to switch. @@ -65,17 +54,17 @@ This section shows issues that might significantly affect user experience in the | | Description | Notes | | -------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| Statistical insights | Important conclusions related to audio and video freezing. |
  • If the number of [ACU](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) for the current call is less than 20 or no conclusion is available, this subsection is hidden.
  • The data granularity of this subsection is one minute. If fewer than 20 (included) users are online during a given minute, the data point for this minute is ignored.
  • In the upper right corner of this subsection, click the arrow icon to scroll to [Detailed statistics](#data).
  • | +| Statistical insights | Important conclusions related to audio and video freezing. |
    • If the number of [ACU](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) for the current call is less than 20 or no conclusion is available, this subsection is hidden.
    • The data granularity of this subsection is one minute. If fewer than 20 (included) users are online during a given minute, the data point for this minute is ignored.
    • In the upper right corner of this subsection, click the arrow icon `>` to scroll to [Detailed statistics](#data).
    | {/* | Call experience (beta) | Significant user experience issues during the call. See [Diagnosis checklist items](/agora-analytics/reference/call-search-terms#diagnosis-checklist-items). | Click on an issue to jump to the corresponding [Call Diagnosis (Beta) ](#diagnosis) page, where you can view the diagnosis conclusions of up to 10 users at the same time. | | Host diagnosis (beta) | Issues encountered by hosts during the call. See [Diagnosis checklist items](/agora-analytics/reference/call-search-terms#diagnosis-checklist-items). | Click on an issue to jump to the corresponding [Call Diagnosis (Beta) ](#diagnosis) page, where you can view the diagnosis conclusions of up to 10 users at the same time. | -| Abnormal host (beta) | Hosts who encounter streaming exceptions during the call, which are displayed along with their user IDs, streaming duration, and exception types. |
  • If the Host diagnosis subsection shows no exception, this subsection is hidden.
  • Click on an exception to jump to the corresponding [Call Diagnosis (Beta)](#diagnosis) page, where you can view the diagnosis results for this host.
  • | +| Abnormal host (beta) | Hosts who encounter streaming exceptions during the call, which are displayed along with their user IDs, streaming duration, and exception types. |
    • If the Host diagnosis subsection shows no exception, this subsection is hidden.
    • Click on an exception to jump to the corresponding [Call Diagnosis (Beta)](#diagnosis) page, where you can view the diagnosis results for this host.
    | */} ### Detailed statistics -This section displays call quality statistics in a variety of charts to help monitor and analyze large-scale calls. +This section displays call quality statistics through various charts to help monitor and analyze large-scale calls. ![1650429301020](https://web-cdn.agora.io/docs-files/1650429301020) @@ -83,25 +72,23 @@ This section displays call quality statistics in a variety of charts to help mon This section includes the following subsections: -| | Description | Notes | -| ---------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| Sub-section | Description | Notes | +| ---------------------------- | ----------- | ----- | | Time selector | Select the time range you want to inspect. | If you change the time range, the data displayed in all of the following subsections is updated. | -| Top video freezing users/Video freeze details |
  • If the number of [ACU](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) does not exceed 20 in the current call, this subsection is shown as **Top video freezing users**, ranking all users in the descending order of video freeze rate.
  • If the number of ACU in the current call exceeds 20, this subsection is shown as **Video freeze details**, distributing users into different brackets based on their video freeze rate.
  • | N/A | -| TOP audio freezing users/Audio freeze details |
  • If the number of ACU does not exceed 20 in the current call, this subsection is shown as **Top audio freezing users**, ranking all users in the descending order of audio freeze rate.
  • If the number of ACU in the current call exceeds 20, this subsection is shown as **Audio freeze details**, distributing users into different brackets based on their audio freeze rate.
  • | N/A | -| Trend tracking | Relations between the following metrics and time:
  • Audio freezing users: The number of users whose audio freeze rate is greater than 3%.
  • Video freezing users: The number of users whose video freeze rate is greater than 5%.
  • Number of in-call users
  • [Audio freeze rate](/agora-analytics/reference/call-search-terms#audio-freeze-rate)
  • [Video freeze rate](/agora-analytics/reference/call-search-terms#video-freeze-rate)
  • |
  • If the number of ACU in the current call does not exceed 20, this subsection is hidden.
  • All the metrics displayed in the subsection are calculated by minute.
  • The value of Peak Call Users to the left of the line chart is for reference only. The more precise metric is [Peak Concurrent Users](/agora-analytics/reference/call-search-terms#pcu-peak-concurrent-users) at the top of the page.
  • | +| Top video freezing users/Video freeze details |
    • If the number of [ACU](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) does not exceed 20 in the current call, this subsection is shown as **Top video freezing users**, ranking all users in the descending order of video freeze rate.
    • If the number of ACU in the current call exceeds 20, this subsection is shown as **Video freeze details**, distributing users into different brackets based on their video freeze rate.
    | N/A | +| TOP audio freezing users/Audio freeze details |
    • If the number of ACU does not exceed 20 in the current call, this subsection is shown as **Top audio freezing users**, ranking all users in the descending order of audio freeze rate.
    • If the number of ACU in the current call exceeds 20, this subsection is shown as **Audio freeze details**, distributing users into different brackets based on their audio freeze rate.
    | N/A | +| Trend tracking | Relations between the following metrics and time:
    • Audio freezing users: The number of users whose audio freeze rate is greater than 3%.
    • Video freezing users: The number of users whose video freeze rate is greater than 5%.
    • Number of in-call users
    • [Audio freeze rate](/agora-analytics/reference/call-search-terms#audio-freeze-rate)
    • [Video freeze rate](/agora-analytics/reference/call-search-terms#video-freeze-rate)
    |
    • If the number of ACU in the current call does not exceed 20, this subsection is hidden.
    • All the metrics displayed in the subsection are calculated by minute.
    • The value of Peak Call Users to the left of the line chart is for reference only. The more precise metric is [Peak Concurrent Users](/agora-analytics/reference/call-search-terms#pcu-peak-concurrent-users) at the top of the page.
    | | Metric Analysis | Distribution of audio freeze rate and video freeze rate by geography, device, network, SDK version, and operating system. | If the number of ACU in the current call does not exceed 20, this subsection is hidden. | ## View Call Details -The Call Details page helps you locate user-specific quality issues and exceptions. - -The Call Details page consists of the following subpages: +The Call Details page helps you locate user-specific quality issues and exceptions. It consists of the following subpages: - Homepage: The page you enter by clicking the **Call Details** tab on the top. On the homepage, you can get basic information about each user in the call. You can also view the key events and audio and video quality metrics for 20 users simultaneously. -- End-to-end details page: This page provides all of the key quality metrics and events for a single sender/receiver pair. +- End-to-end details page: This page provides all the key quality metrics and events for a single sender-receiver pair. - Sender details page: This page provides all of the key quality metrics and events for a single sender. -For details on how to troubleshoot common call-quality issues, see [Troubleshooting Manual](/agora-analytics/reference/call-search-manual). +For details on how to troubleshoot common call-quality issues, see [Troubleshooting](/agora-analytics/reference/call-search-manual). ### Homepage @@ -109,9 +96,9 @@ To view the Call Details homepage, follow these steps: 1. [Use Call Search](#search) to find the call, then click **Call Details** in the **Action** column. - - If [the number of Accumulated Call Users (ACU)](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) is greater than or equal to 50, you first enter the Call Overview page. Click the **Call Details** tab on the top to switch. + - If the [ACU](/agora-analytics/reference/call-search-terms#acu-accumulated-call-users) is greater than or equal to 50, first enter the Call Overview page. Click the **Call Details** tab on the top to switch. - - If the number of ACU is less than 50, you enter the Call Details homepage. + - If the ACU is less than 50, you enter the Call Details homepage. 2. Add users through one of the following ways: @@ -119,7 +106,7 @@ To view the Call Details homepage, follow these steps: - Add in a batch: Click **Advanced search**, add one or more filters as needed, and then click **Search**. In the returned list, select the users you want to add, and click **Save**. -3. Display or hide the [audio and video quality metrics](#audio-and-video-quality-metrics) for the added users: Click the switch in the **View metrics** column. You can turn on the switch for a maximum of 20 users at the same time. +3. Display or hide the [audio and video quality metrics](#audio-and-video-quality-metrics) for the added users: Click the switch in the **View metrics** column. You can turn on the switch for a maximum of 20 users simultaneously. 4. Select the time range you want to inspect. If the time range changes, the audio and video quality metrics data is updated. @@ -127,9 +114,9 @@ To view the Call Details homepage, follow these steps: #### Key events -For each user whose **View metrics** switch is turned on, this section shows their events during the selected time range in two views: Timeline and list. +For each user with the **View metrics** switch enabled, this section displays their events within the selected time range in two views: Timeline and List -**Timeline** +**Timeline view** The circles on the timeline represent events. A larger circle means more events occurred at that time. If a noteworthy event occurred, the circle is marked red. @@ -145,7 +132,7 @@ In the timeline view, you can do the following: - Click **List view** in the upper right corner to switch to the list view. -**List** +**List view** The list view has three columns: Time, event type, and event. The list is displayed side by side with the corresponding user’s audio and video quality metrics. @@ -165,7 +152,7 @@ The metrics are defined in [User-specific metrics](/agora-analytics/reference/ca **Sender’s view** -Click **Sender’s view**, and click **Audio** or **Video**. You can see the sending bitrates and upstream packet loss rates for all [senders](/agora-analytics/reference/call-search-terms#senderhost) among the selected users. +Click **Sender’s view**, and choose **Audio** or **Video**. You can see the sending bitrates and upstream packet loss rates for all [senders](/agora-analytics/reference/call-search-terms#senderhost) among the selected users. Follow these steps to locate abnormal senders: @@ -179,13 +166,13 @@ Click **Receiver’s view**, and click **Audio** or **Video**. You can see the r Follow these steps to locate abnormal receivers: -- If the line chart has many red glitches, the receiver might experience significant freezing issues. In the upper right corner of the line chart, click **Inspect a remote client**, and select the corresponding sender’s user ID from the drop-down menu. You enter the [end-to-end details page](#end-to-end-details-page) for further inspection. +- If the line chart has many red glitches, the receiver might experience significant freezing issues. In the upper right corner of the line chart, click **Inspect a remote client**, and select the corresponding sender’s user ID from the drop-down menu. You enter the [end-to-end details page](#end-to-end-details-page) for further inspection. -- If an exclamation mark ![](https://web-cdn.agora.io/docs-files/1650255317903) appears in the upper right corner, the user might encounter an issue that significantly affects the user experience. Click the exclamation mark to enter this user’s [Call diagnosis (Beta)](#view-call-diagnosis-beta) page. +- If an exclamation mark ![](/images/analytics/exclaimaition.png) appears in the upper right corner, the user might have encountered an issue that significantly affected the user experience. Click the exclamation mark to enter this user’s [Call diagnosis (Beta)](#view-call-diagnosis-beta) page. ### End-to-end details page -This page provides the following information for the selected sender/receiver pair: +This page provides the following information for the selected sender-receiver pair: - Call Diagnosis conclusions. If the selected receiver and sender do not encounter significant experience issues, this information is hidden. @@ -223,19 +210,19 @@ To view the Call Diagnosis page, follow these steps: - Exception: Select the exception type from the drop-down menu, such as sending issue, receiving issue, network issue, capturing issue, abnormal behavior, or user experience exception issue. 4. Click a user in the returned list to see the diagnosis conclusion: - If only one user ID is displayed, the conclusion is for the corresponding user. - - If two user IDs are displayed, the conclusion is for the corresponding sender/receiver pair. + - If two user IDs are displayed, the conclusion is for the corresponding sender-receiver pair. 5. (Optional) Click **View Details**: - If the conclusion is for a single user and the user is a sender, you enter the [sender details page](#sender-details-page). - If the conclusion is for a single user and the user is a receiver, you enter the [call details homepage ](#homepage), and the switch for **View metrics** is turned on for the user. - - If the conclusion is for a sender/receiver pair, you enter their [end-to-end details page](#end-to-end-details-page). + - If the conclusion is for a sender-receiver pair, you enter their [end-to-end details page](#end-to-end-details-page). ## Give your feedback -All features related to the auto-diagnosis engine are currently in beta. Follow these steps to give us your feedback: +All features related to the auto-diagnosis engine are currently in beta. Follow these steps to send your feedback: 1. Hover your mouse over a diagnosis entry in any of the following places: - - The Call Diagnosis page. - - The Call experience (beta), Host diagnosis (beta), or Abnormal host (beta) subsection on the Call Overview page. + - The Call Diagnosis page. + - The Call experience (beta), Host diagnosis (beta), or Abnormal host (beta) subsection on the Call Overview page. 2. Hover your mouse over the highlighted text **Is it accurate?**. 3. Click **Accurate diagnosis** or **Inaccurate diagnosis**. 4. (Optional) Enter a detailed description in the text box. diff --git a/shared/agora-analytics/_data-insight.mdx b/shared/agora-analytics/_data-insight.mdx index f510d5e1c..7981de0c0 100644 --- a/shared/agora-analytics/_data-insight.mdx +++ b/shared/agora-analytics/_data-insight.mdx @@ -1,8 +1,5 @@ import * as data from '@site/data/variables.js'; - - - **Data Insights** are designed to help you understand the usage and quality of calls in your app. You can view their distribution in multiple dimensions with daily and hourly data breakdown. ## Getting started diff --git a/shared/common/core-concepts/agora-console.mdx b/shared/common/core-concepts/agora-console.mdx index 68ebe4cfd..36238f234 100644 --- a/shared/common/core-concepts/agora-console.mdx +++ b/shared/common/core-concepts/agora-console.mdx @@ -1,30 +1,31 @@ +### Agora Console + is the main dashboard where you manage your projects and services. Before you can use 's SDKs, you must first create a project in the . See [Agora account management](../get-started/manage-agora-account) for details. -To use , create a project in the first. +To use , create a project in the first. ![Create project in Agora Console](/images/common/create-project.svg) -#### - - provides an intuitive interface for developers to query and manage their account. After registering an Agora Account, you use the to perform the following tasks: + provides an intuitive interface for developers to query and manage their account. After registering an Agora account, you use the to perform the following tasks: -- Manage the account +- Manage your account - Create and configure projects and services -- Get an App ID +- Get an App ID and the App certificate +- Generate temporary tokens for development and testing - Manage members and roles - Check call quality and usage - Check bills and make payments - Access product resources +See [Agora account management](../get-started/manage-agora-account) for details on how to manage all aspects of your account. + also provides RESTful APIs that you use to implement features such as creating a project and fetching usage numbers programmatically. -#### Account Management -See [Agora account management](../get-started/manage-agora-account) for details on how to manage all aspects of your account. diff --git a/shared/common/core-concepts/app-certificate.mdx b/shared/common/core-concepts/app-certificate.mdx index 3be9d5353..ff4d3791f 100644 --- a/shared/common/core-concepts/app-certificate.mdx +++ b/shared/common/core-concepts/app-certificate.mdx @@ -1,5 +1,5 @@ -#### App Certificate +### App Certificate -An App Certificate is a unique key generated by the to secure projects through token authentication. It is required, along with the App ID, to generate a token that proves authorization between your systems and 's network. App Certificates are used to generate or authentication tokens. +An App Certificate is a unique key generated by the to secure projects through token authentication. It is required, along with the App ID, to generate a token that proves authorization between your systems and 's network. App Certificates are used to generate authentication tokens. -App Certificates should be stored securely in your backend systems. If your App Certificate is compromised or to meet security compliance requirements, you can invalidate certificates and create new ones through the . +Store the App Certificate securely in your backend systems. If your App Certificate is compromised or to meet security compliance requirements, you can invalidate certificates and create new ones through the . diff --git a/shared/common/core-concepts/app-id.mdx b/shared/common/core-concepts/app-id.mdx index af9b69fa4..d62628679 100644 --- a/shared/common/core-concepts/app-id.mdx +++ b/shared/common/core-concepts/app-id.mdx @@ -1,26 +1,5 @@ -#### App ID +### App ID -The App ID is a unique key generated by 's platform to identify each project. Each project in your account is assigned its own unique App ID. The App ID is critical for connecting users within your app. It's used to initialize the in your app, and as one of the required keys to create authentication tokens for secure communication. Retrieve your App ID using the . +The App ID is a unique key generated by to identify each project and provide billing and other statistical data services. The App ID is critical for connecting users within your app. It is used to initialize the in your app, and as one of the required keys to create authentication tokens for secure communication. Retrieve the App ID for your project using the Agora Console. - uses the App ID to identify each app and provide billing and other statistical data services. - -App IDs are stored on the front-end client and do not provide access control. Projects using only an App ID allow any user with the App ID to join voice and video streams. - - - -For applications requiring access controls, such as those in production environments, choose an **App ID + Token** mechanism for [user authentication](../get-started/authentication-workflow) when creating a new project. Without an authentication token, your environment is open to anyone with access to your App ID. - - - - - -For applications requiring access controls, such as those in production environments, choose an **App ID + Token** mechanism for user authentication when creating a new project. Without an authentication token, your environment is open to anyone with your App ID. - - - - - -For applications requiring access controls, such as those in production environments, choose an **App ID + Token** mechanism for [user authentication](../get-started/authentication-workflow) when creating a new project. Without an authentication token, your environment is open to anyone with your App ID. - - +App IDs are stored on the front-end client and do not provide access control. Projects using only an App ID allow any user with the App ID to join. For access control, especially in production environments, choose the **App ID + Token** mechanism for user authentication when creating a new project. Without authentication tokens, your environment is open to anyone with access to your App ID. diff --git a/shared/common/core-concepts/audio-video-concepts.mdx b/shared/common/core-concepts/audio-video-concepts.mdx index 03e379397..1dc466490 100644 --- a/shared/common/core-concepts/audio-video-concepts.mdx +++ b/shared/common/core-concepts/audio-video-concepts.mdx @@ -1,28 +1,38 @@ + + ### Basic audio and video interaction workflow -The following diagram shows the basic workflow of using the SDK to implement basic audio and video interaction. +The following figure shows the basic workflow of using the to implement basic audio and video interaction. + + + +### Basic audio interaction workflow + +The following diagram shows the basic workflow of using the to implement basic audio interaction. + ![orientation_adaptive_locked_landscape](/images/common/basic-audio-and-video.svg) - uses the following basic concepts: + relies on the following fundamental concepts to enable seamless real-time communication: + ### Track -A track contains specific audio or video information and consists of three parts: input source, filter, and output end. According to the different functions in the RTC process, tracks can be further classified into uplink tracks (the sending end) and downlink tracks (the receiving end). +A track contains specific audio or video information. It consists of three parts: input source, filter, and output. According to different functions in the RTC process, tracks can be further classified into uplink tracks and downlink tracks. ![Track](/images/common/track.svg) #### Input source -Located at the beginning of the track, the input source represents the local audio and video data to be published. It can be a camera, a screen capture, a microphone, an audio or video parsed from a file, and so on. +The input source is the local audio or video data to be published. It can be from a camera, screen capture, or microphone source, or parsed from a media file. #### Filter -Performs a series of processing operations on audio and video, including pre-processing and post-processing, and transmits the processed audio and video signals to the output end. Filters can be connected to multiple input sources or multiple outputs. +A filter performs a series of processing operations on audio and video, including pre-processing and post-processing, and transmits the processed audio and video signals to the output. Filters can be connected to multiple input sources or multiple outputs. - - Pre-processing: Audio/video filters in the sender track, such as virtual background, beautification, echo cancellation, noise reduction, and so on. - - Post-processing : Audio/video filters in the receiving track , such as super-resolution, spatial sound effects, and so on. + - Pre-processing: Audio/video filters in the sender track, such as virtual background, beautification, echo cancellation, and noise reduction. + - Post-processing : Audio/video filters in the receiving track, such as super-resolution, and spatial audio effects. #### Output @@ -55,6 +65,8 @@ The audio output device used by the app when playing audio. Common audio routes - Set local playback device: `setPlaybackDevice` - Set up audio routing: `setDefaultAudioRouteToSpeakerphone` + + ### Video module The following diagram shows the main functions of the video module in video interaction: @@ -74,4 +86,6 @@ The APIs used by the video module are as follows: - Local preview: `setupLocalVideo` → `startPreview` - Video rendering shows: `setupRemoteVideo` + + \ No newline at end of file diff --git a/shared/common/core-concepts/channel-profile.mdx b/shared/common/core-concepts/channel-profile.mdx index acd428e83..878b91056 100644 --- a/shared/common/core-concepts/channel-profile.mdx +++ b/shared/common/core-concepts/channel-profile.mdx @@ -1,8 +1,8 @@ -#### Channel profile +### Channel profile -The SDK applies different optimization methods according to the selected channel profile. supports the following channel profiles: +The applies different optimization methods according to the selected channel profile. supports the following channel profiles: | Channel profile | Description | |--------------------|-----------------| -| `COMMUNICATION` | This profile is suitable for one-on-one or group calls, where all users in the channel talk freely. | -| `LIVE_BROADCASTING` | In a live streaming channel, users have two client roles: *host* and *audience*. The *host* sends and receives audio or video, while the *audience* only receives audio or video with the sending function disabled. | +| **Communication** | This profile is suitable for one-on-one or group calls, where all users in the channel talk freely. | +| **Live Broadcasting** | In a live streaming channel, users have two client roles: *host* and *audience*. The *host* sends and receives streams, while the *audience* only receives streams with the sending function disabled. | diff --git a/shared/common/core-concepts/channel.mdx b/shared/common/core-concepts/channel.mdx index 585721d44..7e0e3b5e4 100644 --- a/shared/common/core-concepts/channel.mdx +++ b/shared/common/core-concepts/channel.mdx @@ -1,4 +1,4 @@ -#### Channel +### Channel In 's platform, a channel is a way of grouping users together and is identified by a unique _channel name_. Users who connect to the same channel can communicate with each other. A channel is created when the first user joins and ceases to exist when the last user leaves. @@ -11,6 +11,7 @@ In , channels serve as a data transfer management mechanism for p | Channel Type | Main Features | Applicable Scenarios | | ------------ | ------------------- | --------------------------------- | | Message | Follows the industry-standard pub/sub model. Channels do not need to be created in advance, and there is no upper limit on the number of publishers and subscribers in a channel. | Multi-device management and command exchange in the IoT industry, location tracking in smart devices, etc. | +| User | One-to-one message sending and receiving, this channel type supports the delivery receipt function. | Useful in one-on-one communication scenarios such as private chats and customer support interactions. | | Stream | Follows the chat room model. Users need to join the channel to send and receive event notifications. Messages are managed and delivered through topics, and a single channel allows up to 1,000 users to join simultaneously. Supports channel sharing and synchronous transmission of audio and video data. | High-frequency and large concurrent data transmission or co-channel and synchronous transmission with audio and video data, such as in metaverse and cloud gaming applications. | @@ -19,11 +20,16 @@ In , channels serve as a data transfer management mechanism for p Channels are created by calling the methods for transmitting real-time data. uses different channels to transmit different types of data: -- The channel is used for transmitting audio or video data. -- The channel is used for transmitting messaging or signaling data. + +- A channel is used for transmitting audio or video data. + + +- A channel is used for transmitting audio data. + +- A channel is used for transmitting messaging or signaling data. These channels are independent of each other. -Additional services provided by , such as Cloud Recording and Real-Time Speech-To-Text, join the channel to provide real-time recording, transmission acceleration, media playback, and content moderation. +Additional services provided by , such as Cloud Recording and , join the channel to provide real-time recording, transmission acceleration, media playback, and content moderation. diff --git a/shared/common/core-concepts/cloud-recording.mdx b/shared/common/core-concepts/cloud-recording.mdx index c06187415..49e350ba7 100644 --- a/shared/common/core-concepts/cloud-recording.mdx +++ b/shared/common/core-concepts/cloud-recording.mdx @@ -10,18 +10,16 @@ Agora enables you to record video and voice calls or streams in This page introduces the key processes and concepts you need to know to use . -## Using the - - ## General concepts - uses the following basic concepts: + relies on the following fundamental concepts to enable seamless real-time communication: + - + ## Cloud recording concepts diff --git a/shared/common/core-concepts/connection.mdx b/shared/common/core-concepts/connection.mdx index cf42461bc..9d53e981f 100644 --- a/shared/common/core-concepts/connection.mdx +++ b/shared/common/core-concepts/connection.mdx @@ -1,3 +1,3 @@ -#### Connection (RtcConnection) +### RtcConnection -The connection between the SDK and the channel. When you need to publish or receive multiple streams in multiple channels, a connection is used to specify the target channel. +The connection between the SDK and the channel. When publishing or subscribing to multiple streams in multiple channels, a connection is used to specify the target channel. diff --git a/shared/common/core-concepts/flexible-classroom-concepts.mdx b/shared/common/core-concepts/flexible-classroom-concepts.mdx index 329732b91..195a7e83c 100644 --- a/shared/common/core-concepts/flexible-classroom-concepts.mdx +++ b/shared/common/core-concepts/flexible-classroom-concepts.mdx @@ -1,5 +1,5 @@ -#### User +### User Users are the initiators of behavior in Flexible Classroom. A user has the following properties: @@ -10,7 +10,7 @@ Users are the initiators of behavior in Flexible Classroom. A user has the follo Developers can set the above user properties when calling the `launch` method. -#### Room +### Room Rooms in Flexible Classroom are just like the physical classrooms in schools. Classes offered by different teachers with diversified teaching materials can take place in the same room at different times. A school can have different types of classrooms, such as traditional classrooms, laboratories, and multimedia classrooms. Similarly, the rooms of Flexible Classroom can be divided into several types. A room has the following properties: @@ -21,7 +21,7 @@ Rooms in Flexible Classroom are just like the physical classrooms in schools. Cl Developers can set the above user properties when calling the `launch` method. A room is created automatically with the parameters (the room ID, room name, and room type) set by the first user joining the room. To join the same room with the first user, users need to call the `launch` method and pass in the same parameters (room ID, room name, and room type). Agora automatically destroys the room one hour after all users leave the room. -#### Class +### Class Classes in Flexible Classroom are just like the actual classes offered by different teachers in offline teaching scenarios. A class has the following properties: diff --git a/shared/common/core-concepts/interactive-whiteboard.mdx b/shared/common/core-concepts/interactive-whiteboard.mdx index d0d9d49ee..ff93e81b3 100644 --- a/shared/common/core-concepts/interactive-whiteboard.mdx +++ b/shared/common/core-concepts/interactive-whiteboard.mdx @@ -10,11 +10,6 @@ Agora enables you to record video and voice calls or streams in This page introduces the key processes and concepts you need to know to use . -## Using the - - -For details, see [Enable ](../get-started/enable-whiteboard). - ## Interactive Whiteboard concepts The following figure shows the basic process of configuration and joining a whiteboard room: @@ -30,7 +25,7 @@ Also known as the App ID, the `AppIdentifier` is the unique identifier of your p The access key pair (AK amd SK) is used to generate tokens. ### SDK token -The SDK token is a dynamic key generated by the Agora console, generally used for project testing. In a production environment, you call the server API or use sample code to generate an SDK token on your app server. +The SDK token is a dynamic key used for authentication. For project testing, you can generate a token using the . In a production environment, you call the server API or use sample code to generate an SDK token on your app server. ### Types of tokens @@ -123,4 +118,9 @@ In multi-window mode, the interactive whiteboard supports inserting `PPT` or whi ### Scene -When you enter a whiteboard room, you see a page that extends infinitely in all directions. This page is called a scene. On a scene, you can write, draw, insert an image, and present a dynamic `PPT` slide. In a whiteboard room, you can add multiple scenes, switch between scenes, and move around a scene. For details, see [Scenes overview](/interactive-whiteboard/develop/scenes/overview). \ No newline at end of file +When you enter a whiteboard room, you see a page that extends infinitely in all directions. This page is called a scene. On a scene, you can write, draw, insert an image, and present a dynamic `PPT` slide. In a whiteboard room, you can add multiple scenes, switch between scenes, and move around a scene. For details, see [Scenes overview](/interactive-whiteboard/develop/scenes/overview). + + + + +For details, see [Enable ](../get-started/enable-whiteboard). \ No newline at end of file diff --git a/shared/common/core-concepts/open-ai-intro.mdx b/shared/common/core-concepts/open-ai-intro.mdx index 8f8af22bf..3f8d8647e 100644 --- a/shared/common/core-concepts/open-ai-intro.mdx +++ b/shared/common/core-concepts/open-ai-intro.mdx @@ -10,10 +10,6 @@ Combining Agora’s real-time audio communication with OpenAI’s Large Language This guide introduces the key processes and concepts you need to know to use 's platform effectively. -## Using the - - - ## General Concepts @@ -22,6 +18,7 @@ This guide introduces the key processes and concepts you need to know to use + ## RESTful APIs diff --git a/shared/common/core-concepts/publish.mdx b/shared/common/core-concepts/publish.mdx index 881da46c1..f2df6b923 100644 --- a/shared/common/core-concepts/publish.mdx +++ b/shared/common/core-concepts/publish.mdx @@ -1,4 +1,12 @@ -#### Publish +### Publish + + Publishing is the act of sending a user’s audio or video data to the channel. Usually, the published stream is created by the audio data sampled from a microphone or the video data captured by a camera. You can also publish media streams from other sources, such as an online music file or the user’s screen. -After successfully publishing a stream, the SDK continues sending media data to other users in the channel. By publishing the local stream and subscribing to remote streams, users communicate with each other in real-time. + + + +Publishing is the act of sending a user’s audio data to the channel. Usually, the published stream is created by the audio data sampled from a microphone. You can also publish media streams from other sources, such as an online music file. + + +After successfully publishing a stream, the SDK uses it to send media data to other users in the channel. Users communicate with each other in real-time by publishing local streams and subscribing to remote streams. diff --git a/shared/common/core-concepts/real-time-stt.mdx b/shared/common/core-concepts/real-time-stt.mdx index 92eb320a0..285c1b57c 100644 --- a/shared/common/core-concepts/real-time-stt.mdx +++ b/shared/common/core-concepts/real-time-stt.mdx @@ -10,13 +10,9 @@ import SD_RTN from './sd-rtn.mdx'; This guide introduces the key processes and concepts you need to know to use . -## Using the - - - ## General concepts - uses the following basic concepts: + relies on the following fundamental concepts to enable seamless real-time communication: @@ -24,3 +20,4 @@ This guide introduces the key processes and concepts you need to know to use + \ No newline at end of file diff --git a/shared/common/core-concepts/sd-rtn.mdx b/shared/common/core-concepts/sd-rtn.mdx index c353d810d..d20570e48 100644 --- a/shared/common/core-concepts/sd-rtn.mdx +++ b/shared/common/core-concepts/sd-rtn.mdx @@ -1,7 +1,9 @@ -#### +### -'s core engagement services are powered by its Software-Defined Real-time Network (SD-RTN™), which is accessible and available anytime, anywhere around the world. Unlike traditional networks, the software-defined network is not confined by device, phone numbers, or a telecommunication provider's coverage area. has data centers globally, covering over 200 countries and regions. The network delivers sub-second latency and high availability of real-time video and audio anywhere on the globe. With , can deliver live user engagement experiences in the form of real-time communication (RTC) with the following advantages: +'s core engagement services are powered by its Software-Defined Real-time Network (SD-RTN™), a global infrastructure accessible anytime, anywhere. Unlike traditional networks, is not restricted by devices, phone numbers, or telecom coverage areas. With data centers in over 200 countries and regions, it ensures sub-second latency and high availability for real-time media. + + enables live user engagement through real-time communication (RTC), offering: - Unmatched quality of service - High availability and accessibility diff --git a/shared/common/core-concepts/signaling.mdx b/shared/common/core-concepts/signaling.mdx index 8f9410df8..e982ca14b 100644 --- a/shared/common/core-concepts/signaling.mdx +++ b/shared/common/core-concepts/signaling.mdx @@ -10,15 +10,13 @@ Agora’s enables real-time metadata synchronization and low-lat This article introduces the key processes and concepts you need to know to use the . -## Using the - - ## General concepts - uses the following basic concepts: + relies on the following fundamental concepts to enable seamless real-time communication: + - + diff --git a/shared/common/core-concepts/stream.mdx b/shared/common/core-concepts/stream.mdx index c3ed614ae..8ea2a67bb 100644 --- a/shared/common/core-concepts/stream.mdx +++ b/shared/common/core-concepts/stream.mdx @@ -1,7 +1,7 @@ -#### Stream +### Stream -A stream is a sequence of digitally-encoded coherent signals that contains audio or video data. Users in a channel [publish](#publish) local streams and [subscribe](#subscribe) to remote streams from other users. +A stream is a sequence of digitally encoded, coherent signals that contain media data. Users in a channel [publish](#publish) local streams and [subscribe](#subscribe) to remote streams from other users. diff --git a/shared/common/core-concepts/subscribe.mdx b/shared/common/core-concepts/subscribe.mdx index 7c23a1d71..dbe83dd8e 100644 --- a/shared/common/core-concepts/subscribe.mdx +++ b/shared/common/core-concepts/subscribe.mdx @@ -1,3 +1,9 @@ -#### Subscribe +### Subscribe -Subscribing is the act of receiving media streams published by remote users to the channel. A user receives audio and video data from other users by subscribing to one or more of their streams. You either directly play the subscribed streams or process incoming data for other purposes such as recording or capturing screenshots. \ No newline at end of file + +Subscribing is the act of receiving media streams published by remote users to the channel. A user receives audio and video data from other users by subscribing to one or more of their streams. You either directly play the subscribed streams or process incoming data for other purposes such as recording or capturing screenshots. + + + +Subscribing is the act of receiving media streams published by remote users to the channel. A user receives audio data from other users by subscribing to one or more of their streams. You either directly play the subscribed streams or process incoming data for other purposes such as recording. + diff --git a/shared/common/core-concepts/token.mdx b/shared/common/core-concepts/token.mdx index b60bcc13d..36b4024c9 100644 --- a/shared/common/core-concepts/token.mdx +++ b/shared/common/core-concepts/token.mdx @@ -1,13 +1,12 @@ -#### Tokens +### Tokens A token is a dynamic key generated using the App ID, App Certificate, user ID, and expiration timestamp. Tokens authenticate and secure access to 's services, ensuring only authorized users can join a channel and participate in real-time communication. -Tokens are generated on your server and passed to the client for use in the or . The token generation process involves digitally signing the App ID, App Certificate, user ID, and expiration timestamp using a specific algorithm, preventing tampering or forgery. +Tokens are generated on your server and passed to the client for use in . The token generation process involves digitally signing the App ID, App Certificate, user ID, and expiration timestamp using a specific algorithm, preventing tampering or forgery. -For testing and during development, use the to generate temporary tokens. For production environments, implement a token server as part of your security infrastructure to control access to your channels. +During development and testing, use the to generate temporary tokens. For production environments, implement a token server as part of your security infrastructure to control access to your channels. - + For information on setting up a token server for generating and managing tokens, refer to the guide on [Secure authentication with tokens](/video-calling/get-started/authentication-workflow). diff --git a/shared/common/core-concepts/user-id.mdx b/shared/common/core-concepts/user-id.mdx index 1eb667457..2d3a5889e 100644 --- a/shared/common/core-concepts/user-id.mdx +++ b/shared/common/core-concepts/user-id.mdx @@ -1,19 +1,17 @@ -#### User ID +### User ID -In 's platform, the UID is an integer value that is a unique identifier assigned to each user within the context of a specific channel. When joining a channel, you have the choice to either assign a specific UID to the user or pass `0` or `null` and allow 's platform to automatically generate and assign a UID for the user. If two users attempt to join the same channel with the same UID, it can lead to unexpected behavior. +In , the UID is an integer value that uniquely identifies a user within the context of a channel. When joining a channel, you have the option to either assign a specific UID to the user or pass `0` or `null` and allow to automatically generate and assign a UID to the user. If two users attempt to join the same channel with the same UID, it can lead to unexpected behavior. -The UID is used by 's services and components to identify and manage users within a channel. Developers should ensure that UIDs are properly assigned to prevent conflicts. +The UID is used by 's services and components to identify and manage users within a channel. Ensure that UIDs are properly assigned to prevent conflicts. -In , the UID is a string that is a unique identifier and required along with an App ID to initialize the SDK. It is used to identify the user when logging in to and throughout their session. Users can join channels by providing just the channel name, as the UID is already associated with the user during initialization. +In , UID is a unique string identifier required along with an App ID to initialize the SDK. It is used to identify the user when logging in to and throughout their session for billing and online status notifications. Users can join channels by providing just the channel name, as the UID is already associated with the user during initialization. -The same UID cannot log in to from multiple devices at the same time. If s with the same UID logs in to , the previously logged in client is disconnected and sent an event notification. - -The UID is used for billing and online status notifications. +Users cannot simultaneously log in to using the same UID from multiple devices. If a client attempts to log in to with a UID already present in the channel, the previously logged in client is disconnected and sent an event notification. diff --git a/shared/common/core-concepts/user-role.mdx b/shared/common/core-concepts/user-role.mdx index f142ee927..edbfd2d44 100644 --- a/shared/common/core-concepts/user-role.mdx +++ b/shared/common/core-concepts/user-role.mdx @@ -1,6 +1,6 @@ -#### User role +### User role -A user role is used to define whether users in the channel have permission to publish streams. There are two user roles: +The user role defines whether a user in a channel has the permission to publish streams. There are two user roles: -- Host: A user who can publish streams in a channel. -- Audience: A user who cannot publish streams in a channel. Users with this role can only subscribe to remote audio and video streams. \ No newline at end of file +- **Host**: A user who can publish streams to a channel. +- **Audience**: A User who can only subscribe to remote media streams. A user with this role cannot publish streams. diff --git a/shared/common/core-concepts/video-sdk.mdx b/shared/common/core-concepts/video-sdk.mdx index b11931002..897190d27 100644 --- a/shared/common/core-concepts/video-sdk.mdx +++ b/shared/common/core-concepts/video-sdk.mdx @@ -13,19 +13,24 @@ import Connection from './connection.mdx'; import SD_RTN from './sd-rtn.mdx'; import AudioVideoConcepts from './audio-video-concepts.mdx'; + RTC (Real-Time Communication) refers to real-time communication technology, which allows almost instant exchange of audio, video, and other data between the sender and the receiver. SDKs provide real-time audio and video interaction services, with multi-platform and multi-device support. This includes high-definition video calls, voice-only calls, interactive live streaming, as well as one-on-one and multi-group chats. + -This guide introduces the key processes and concepts you need to know to use SDKs. + +RTC (Real-Time Communication) refers to real-time communication technology, which allows almost instant exchange of audio and other types of data between the sender and the receiver. -## Using the + provide real-time audio interaction services, with multi-platform and multi-device support. This includes high-definition voice calls, interactive live streaming, as well as one-on-one and multi-group chats. + - +This guide introduces the key processes and concepts you need to know to use . ## General concepts - uses the following basic concepts: + relies on the following fundamental concepts to enable seamless real-time communication: + @@ -37,7 +42,15 @@ This guide introduces the key processes and concepts you need to know to use - + + + ## Audio and video concepts - + + + +## Audio concepts + + + \ No newline at end of file diff --git a/shared/video-sdk/authentication-workflow/index.mdx b/shared/video-sdk/authentication-workflow/index.mdx index 11181f549..6ab93ba8f 100644 --- a/shared/video-sdk/authentication-workflow/index.mdx +++ b/shared/video-sdk/authentication-workflow/index.mdx @@ -16,8 +16,14 @@ Authentication is the process of validating the identity of each user before the - **Finely control permissions for publishing different streams**: Manage permissions to publish different types of streams, such as audio, video, and data. If you have higher requirements for business security, use these permissions to finely control the validity period of permissions to publish different streams. For details, see [Co-host token authentication](#co-host-token-authentication). + + +The information on this page only applies to `AccessToken2`. If you are using `AccessToken`, refer to the [AccessToken upgrade guide](../develop/integrate-token-generation#upgrade-to-accesstoken2) to upgrade from `AccessToken` to `AccessToken2`. + + The information on this page only applies to `AccessToken2`. If you are using `AccessToken`, refer to the [AccessToken upgrade guide](../core-functionality/integrate-token-generation#upgrade-to-accesstoken2) to upgrade from `AccessToken` to `AccessToken2`. + An authentication token is a dynamic key that is valid for a maximum of 24 hours. On request, a token server returns an authentication token that is valid to join a specific channel or wildcard channels. @@ -308,8 +314,14 @@ This section presents advanced functions related to token authentication. ### Generate wildcard token​s In scenarios where users need to join multiple channels, or frequently switch between channels, they need to request a new token from the token server, each time they join a channel. To solve the problem of frequently requesting tokens when switching channels, enables you to generate wildcard tokens that set the user ID or channel name as a wildcard. Users reuse the same wildcard token to join different channels, which speeds up the process of switching and joining channels. It also helps reduce the pressure on your token server. + + +To generate wildcard tokens you need to have deployed an `AccessToken2` server. If you are still using `AccessToken`, refer to the [AccessToken upgrade guide](../develop/integrate-token-generation) to upgrade to `AccessToken2`. + + To generate wildcard tokens you need to have deployed an `AccessToken2` server. If you are still using `AccessToken`, refer to the [AccessToken upgrade guide](../core-functionality/integrate-token-generation) to upgrade to `AccessToken2`. + The `AccessToken2` code provides two `BuildTokenWithUid` methods. Choose the method according to your needs. When generating a wildcard token, fill in the following parameters according to your requirements: @@ -837,19 +849,19 @@ Refer to the following steps to build and run a token generator locally to gener 1. Open the terminal, go to the `token-server` folder path, and run the following command line to create a `go.mod` file for your token generator. This file defines the import path and dependencies: ```go - $ go mod init sampleServer + go mod init sampleServer ``` 1. Run the following command to install dependencies. ```go - $ go get github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2 + go get github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2 ``` 1. Run the following command to start the token generator: ```go - $ go run server.go + go run server.go ``` After the token generator is deployed successfully, your terminal returns the token generated based on the App ID and App certificate you filled in. @@ -875,8 +887,6 @@ SDKs using `AccessToken2` can interoperate with SDKs using `AccessToken`. The SD This section documents the core methods you use to generate tokens, using the Golang code as an example. - - #### `BuildTokenWithUid` Generate a token, set the expiration time, and define all permissions. @@ -944,4 +954,9 @@ func BuildTokenWithUidAndPrivilege( ### See also -* [AccessToken upgrade guide](../core-functionality/integrate-token-generation) \ No newline at end of file + +* [AccessToken upgrade guide](../develop/integrate-token-generation#upgrade-to-accesstoken2) + + +* [AccessToken upgrade guide](../core-functionality/integrate-token-generation#upgrade-to-accesstoken2) + \ No newline at end of file diff --git a/shared/video-sdk/develop/integrate-token-generation/index.mdx b/shared/video-sdk/develop/integrate-token-generation/index.mdx index 84031b399..bd48de793 100644 --- a/shared/video-sdk/develop/integrate-token-generation/index.mdx +++ b/shared/video-sdk/develop/integrate-token-generation/index.mdx @@ -3,13 +3,13 @@ import * as data from '@site/data/variables'; import ProjectImplement from '@docs/shared/video-sdk/develop/integrate-token-generation/project-implementation/index.mdx'; import Reference from '@docs/shared/video-sdk/develop/integrate-token-generation/reference/index.mdx'; -In order to build a seamless authentication process for your users, you integrate token generation into your identity management system. This guide helps you integrate token generation libraries into your authentication system and shows you how to upgrade to `AccessToken2`. +To secure user access, integrate token authentication into your identity management system. This guide shows you how to use token generation libraries to create access tokens. ## Understand the tech A token contains the following information: -* The App ID generated when you create a project in the +* The App ID for your project * The App certificate for your project * Channel name * User ID @@ -24,7 +24,6 @@ When a user attempts to connect to an channel, your -The following code deploys a token server based on `AccessToken`. To deploy an `AccessToken2` server, refer to [Secure authentication with tokens](../get-started/authentication-workflow#manually-deploy-a-token-generator-locally). - - -Refer to the following steps to build and run a token generator locally to generate tokens: +Follow these steps to build and run a token generator locally: 1. Create a new `token-server` folder. Create a `server.go` file inside the folder and paste the following Golang sample code into the file. Replace the values for `appID` and `appCertificate` with your App ID and App certificate. @@ -58,11 +50,10 @@ Refer to the following steps to build and run a token generator locally to gener {`package main import ( - rtctokenbuilder "github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/RtcTokenBuilder" + rtctokenbuilder "github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2" "fmt" "log" "net/http" - "time" "encoding/json" "errors" "strconv" @@ -83,17 +74,15 @@ Refer to the following steps to build and run a token generator locally to gener // Use RtcTokenBuilder to generate RTC Token func generateRtcToken(int_uid uint32, channelName string, role rtctokenbuilder.Role){ - - appID := "\" - appCertificate := "\" - // For demonstration purposes, set the expiration timestamp to 40 seconds. When the token is about to expire, you can see the process of the client automatically updating the Token. - expireTimeInSeconds := uint32(40) // Token expiration time in seconds - // Get the current timestamp - currentTimestamp := uint32(time.Now().UTC().Unix()) - // Token expiration Unix timestamp - expireTimestamp := currentTimestamp + expireTimeInSeconds - - result, err := rtctokenbuilder.BuildTokenWithUID(appID, appCertificate, channelName, int_uid, role, expireTimestamp) + appID := "" + appCertificate := "" + // Ensure that the expiration time of the token is later than the permission expiration time. Permission expiration time, unit is seconds + tokenExpireTimeInSeconds := uint32(40) + // The token-privilege-will-expire callback is triggered 30 seconds before the permission expires. + // For demonstration purposes, set the expiration time to 40 seconds. You can see the process of the client automatically updating the Token + privilegeExpireTimeInSeconds := uint32(40) + + result, err := rtctokenbuilder.BuildTokenWithUid(appID, appCertificate, channelName, int_uid, role, tokenExpireTimeInSeconds, privilegeExpireTimeInSeconds) if err != nil { fmt.Println(err) } else { @@ -105,6 +94,7 @@ Refer to the following steps to build and run a token generator locally to gener rtc_token = result } + func rtcTokenHandler(w http.ResponseWriter, r *http.Request){ w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.Header().Set("Access-Control-Allow-Origin", "*") @@ -131,16 +121,10 @@ Refer to the following steps to build and run a token generator locally to gener channel_name = t_int.Channel_name role_num = t_int.Role switch role_num { - case 0: - // Deprecated. RoleAttendee and RolePublisher have the same permissions - role = rtctokenbuilder.RoleAttendee - case 1: - role = rtctokenbuilder.RolePublisher - case 2: - role = rtctokenbuilder.RoleSubscriber - case 101: - // Deprecated. RoleAdmin and RolePublisher have the same permissions - role = rtctokenbuilder.RoleAdmin + case 1: + role = rtctokenbuilder.RolePublisher + case 2: + role = rtctokenbuilder.RoleSubscriber } } if (int_err != nil) { @@ -167,11 +151,9 @@ Refer to the following steps to build and run a token generator locally to gener resp["code"] = strconv.Itoa(httpStatusCode) jsonResp, _ := json.Marshal(resp) w.Write(jsonResp) - } func main(){ - // Handle routing // Use int type uid to generate RTC Token http.HandleFunc("/fetch_rtc_token", rtcTokenHandler) fmt.Printf("Starting server at port 8082\n") @@ -186,28 +168,32 @@ Refer to the following steps to build and run a token generator locally to gener 1. Open the terminal, go to the `token-server` folder path, and run the following command line to create a `go.mod` file for your token generator. This file defines the import path and dependencies: ```go - $ go mod init sampleServer + go mod init sampleServer ``` 1. Run the following command to install dependencies. ```go - $ go get + go get github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2 ``` 1. Run the following command to start the token generator: ```go - $ go run server.go + go run server.go ``` -After the token generator is deployed successfully, your terminal returns the token generated based on the App ID and App certificate you filled in. To retrieve and use a token from your , refer to [Secure authentication with tokens](../get-started/authentication-workflow##use-a-token#use-a-token). +After the token generator is deployed successfully, your terminal returns the token generated based on the App ID and App certificate you filled in. + +## Reference + +This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product. ### Upgrade to AccessToken2 -Take the following steps to upgrade your token server to `AccessToken2`. +If your current token server implementation uses `AccessToken`, follow these steps to upgrade your server to `AccessToken2`. -1. Replace the import `rtctokenbuilder` declaration with the following code and delete the declaration that imports "time": +1. Replace the import `rtctokenbuilder` declaration with the following code and delete the declaration that imports `time`: ```go import ( @@ -267,9 +253,14 @@ Take the following steps to upgrade your token server to `AccessToken2`. } ``` -## Reference -This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product. +### See also -* [Token generation code in other languages](../get-started/authentication-workflow#generate-a-token) + +* [Token generation code in other languages](../develop/authentication-workflow#generate-a-token) +* [Token generation API reference](../develop/authentication-workflow#api-reference) + -* [Token generation API reference](../get-started/authentication-workflow#api-reference) \ No newline at end of file + +* [Token generation code in other languages](../get-started/authentication-workflow#generate-a-token) +* [Token generation API reference](../get-started/authentication-workflow#api-reference) + \ No newline at end of file