This section only introduces how to implement Relayed Live Broadcasting by RESTful APIs (server-side). For how to implement Relayed Live Broadcasting by SDK API, see rleated SDK manual for details.
With the RESTful APIs, the streams pushing service can directly enable and control streams pushing through network request, offering more flexibility for your webpage or application, and no need to integrate an SDK.
You can send network requests to start and stop Relayed Live Broadcasting through the RESTful APIs.
Note:
The RESTful APIs of Relayed Live Broadcasting service only supports HTTPS protocol.
This service provides callback for stream pushing status. According to your needs, you can select whether to enable callback after receiving an event notification for streams pushing. Contact cutomer support for Configuration.
You can only send RESTful API requests after it has undergone Basic HTTP authentication with acertificate ID and certificate key; you must also fill in the HTTP request header’s token field.
The certificate ID and certificate key can be found in the My Center background, on the API Certificate page. See specifics on token generation in Basic HTTP Authentication.
startrtmp update video mixing layout and stream pushing address are optional. They can be called multiple times once stream pushing has started and before it has stopped.
Call startrtmp
to start stream pushing.
When calling startrtmp
, you should specify a user ID (for source stream pushing) or task ID (for Relayed Live Broadcasting), and set the related parameters.
Note:
- The user ID and ID are unique.
- Since stream pushing addresses are unique, stream pushing cannot be performed repeatedly on different tasks. The same task may have multiple stream pushing addresses.
See request and response samples in startrtmp
.
Once stream pushing has started, you can call stoprtmp
to stop streams pushing.
See startrtmp
for request and response samples.
Once stream pushing has started, you can call startrtmp
to update the stream mixing layout, and can do so multiple times.
See startrtmp
for request and response samples.