The Agora server automatically uploads the recorded files in TS format to the cloud storage that you set up, and generates an M3U8 file as a playlist pointing to all the recorded TS files. You can get the URL of the M3U8 file and play it online.
If Agora Cloud Recording generates WebM files instead of TS files, you cannot play the M3U8 file online.
Before you start, ensure that all the recorded files are uploaded (the uploadingStatus
in the response of stop
is "uploaded"
).
We use Amazon S3 as an example to show you how to play the recorded files online.
Log in the Amazon S3 console.
Go to the Overview page of the bucket that you use for cloud recording.
Set the metadata of the files as follows:
Configure the bucket policy so that it can be accessed publicly:
<YourBucketName>
to the name of your bucket.{
"Version": "2012-10-17",
"Id": "Policy1553255976836",
"Statement": [
{
"Sid": "Stmt1553255974279",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::<YourBucketName>"
}
]
}
Select the M3U8 file to view the URL.
Navigate to the URL on a web browser to start playing the recorded files.
See How to Serve HLS Video from an S3 Bucket for more information.
uploadingStatus
in the response of stop
is "backuped"
, it indicates that some of the recorded files are uploaded to Agora's backup cloud storage. You should wait until these files are uploaded automatically to your cloud storage before playing the M3U8 file.