23min

Agora Cloud Recording for Streaming Component

Introduction

Agora Cloud Recording for Streaming Component allows you to record your stream into your cloud storage account.

Prerequisites

You must have an account with Agora.IO to interact with the API. Create your development account at: https://docs.agora.io/en

Agora setup

To use the recording functionality, you need an Agora account and a storage account (for example, Amazon S3). Here is the guide that will help you set up the Agora cloud recording for Streaming Component within your app:

1. You need to create or use an existing Agora application - https://console.agora.io/projects

Document image



2. Go to the created application find the "Cloud recording" tab and press “View usage”:

Document image



3. In the opened window, click "Enable Cloud Recording":

Document image



4. Then, go back to your app and get the APP ID and APP Certificate:

Document image



5. Insert your App ID in the same field in Agora plugin:

Document image

Additional requirements

For authorization you’ll need customer ID and customer secret from your Agora account:

  1. In the upper right corner of the Agora dashboard window find the the drop-down and it its list select the RESTfullAPI option, click on it:
Document image



2. Click the button “Add secret” and you’ll get the file with customer ID and customer secret.

3. These credentials (customer ID and secret) must be base64 encoded using the following formula: customerID:customerSecret - (https://www.base64decode.org/ here you can do it).

4. Take the resulting code and paste it into the plugin field for authorization with the word “ Basic ” (example: Basic NTM0YzU0ZWU0M2MxNDMyNGJkZqa2YjhhMzVlNGI4YmY6MWJhOTc2MGM4MDYyNGRhNWIyOWMzOGVkZGVhOMmU1)

Document image



You will need additional data to start recording. How to get them is described below.

  1. Resource ID:
  • Use the API Call action “Get resource ID”:
Document image



  • Fill in the required fields.

2. Token:

  • Go to Project Management tab in your Agora account and pass to Generate Temp Token opposite your application name:
Document image



  • Write the channel name and get the generated token:
Document image



The channel name, that should be set in Plugin action, is the same as in your Agora dashboard:

Document image



  • Paste in the same field in the API Call “Start cloud recording”:
Document image



3. Storage secret and storage access:

  • Go to your storage account (in our example amazon S3);
  • In the My Security Credentials take Access key and Secret Access Key;
  • Past in the same fields.

4. Storage region and vendor:

Plugin element actions

Actions:

  1. Get Resource ID
  2. Start Cloud Recording
  3. Stop Recording
  4. Query Status

To see the example of the Cloud Recording feature, please visit our demo page editor: https://bubble.io/page?type=page&name=agora_streamer_old_demo&id=zeroqode-demo-19&tab=tabs-1

Files written to the storage are saved in the M3U8 and TS formats.

To decode files, you can use the script suggested by Agora: https://docs.agora.io/en/Recording/recording_merge_files?platform=All%20Platforms

Changelogs

Update 08.06.21 - Version 1.22.0

  • Added a new option to enable or disable video and audio in the streaming component.

Update 24.11.21 - Version 1.29.0

  • Fixed recording for streaming mode.

Demo to preview the settings



Updated 13 May 2022
Did this page help?
Yes
No