Imagine yourself being in the spotlight and giving a great presentation in front of your colleagues. The love and appreciation that you got from your presentation make you wish your video calling platform had a recording feature. Well, hold on as we walk you through the process of building your own video chat application with cloud recording.
The Agora SDK simplifies the process of building your own video chat application and adds cloud recording functionality so that you can record your video chats to various cloud platforms like AWS, Qiniu Cloud, Alibaba Cloud, Tencent Cloud, and Kingsoft Cloud.
So gear up and get coding!
This project has three major steps:
Once you’ve created an AWS account, create an S3 bucket that stores all your video recordings.
AmazonS3FullAccess policy
with Programmatic Access.Before deploying our back end we need the following variables. (It’s time to use our text file.) We’ll be using the Heroku one-click deploy to make it super simple to get our back end up and running. You can use any other service as well:
APP_ID=
APP_CERTIFICATE=
RECORDING_VENDOR=
RECORDING_REGION=
BUCKET_NAME=
BUCKET_ACCESS_KEY=
BUCKET_ACCESS_SECRET=
CUSTOMER_ID=
CUSTOMER_CERTIFICATE=
Note: RECORDING_VENDOR=1 for AWS. Click this link for more information.
We will begin by cloning this repo, which demonstrates how to build your own group video calling application using the Agora Flutter SDK. If you want to know more about the SDK, see this blog.
Once you have your Heroku back end up and running, you need to take care of three functions:
Call this function before the joinChannel()
method so that you pass the token and uid you received from the _getToken()
function.
await _getToken();
await _engine.joinChannel(token, widget.channelName, null, uid);
Start Recording: Sends a POST request with the channelName
in the body. Once we get a response, update the state of rid
, sid
, and recUid
.
Stop Recording: Sends a POST request with channelName
, rid
, sid
, and recUid
in the body. In the response, you will get a success or error message based on the parameters you passed.
You can now run the sample app and test it for yourself. By running the app and recording the call for some time, you will find the recordings getting added to your S3 bucket in fragments.
You can get the complete code for this application here.
To learn more about the Agora Flutter SDK and other use cases, see the developer guide here.
You can also have a look at the complete documentation for the functions discussed above and many more here.
And I invite you to join the Agora Developer Slack Community.