

You can find the code on GitHub with a button to quickly deploy it to Heroku in the readme. We’ll use Express to build a back-end service that will listen for requests from the website front end and call the Agora Cloud Player endpoints with the required credentials. Note: The video URL should be publicly accessible. We’ll also define the playVideo function that sends a request to the back-end endpoint with the requestBody, where we can define the channel name, the UID for the Agora Cloud Player service, the RTC token, and the URL for the video we want to play. We define the serverUrl that we’ll build in the next step. It’s a simple component that renders a button to stream the video from the cloud. We’ll replace the component to add a new component called CloudPlayer. You can execute npm start to start the web server on localhost.

To enable the Agora Cloud Player service for your project, you need to make a request through Agora Support by providing your App ID. Let’s start with adding a button to make this request to the website. The back end will listen to requests from the React front end. While you’re in the console, you can grab the App ID from the project management tab. We’ll use these credentials to call the Agora Cloud Player endpoints from the back-end service. Copy the Customer ID and the Customer Secret to a text file. Go to the RESTful API page and click the Add Secret button. Click the RTMP Converter submenu and enable by clicking the button: 2. In the Agora console, go to the Usage tab and select your project from the drop-down menu. If you’re coding along, you can clone what we have so far from GitHub. We’ll start from the project we built in the last blog post.

You can find the completed project on the cloudplayer branch. A high-level understanding of React and Node/Express.An Agora developer account (It’s free, sign up here!).In this blog post, we’ll build on top of that project to stream a cloud video to all users in a video call or livestream using the Agora Cloud Player service. In a previous blog post, we discussed how we can use the Agora Media Push service to publish our livestream to a third-party service like YouTube, Facebook, or Twitch.
