Cloud Recording provides RESTful API, and you can use the function of Cloud Recording by sending network requests.
- The cloud recording RESTful API only supports HTTPS protocol.
- The cloud recording RESTful API provides callback service; notifications are available upon activation. You can choose whether or not to enable callback according to your needs.
You can only send RESTful API requests after it has undergone Basic HTTP authentication with a certificate 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.
Update video mixing layout, layout updatemixrecord, is optional, and can be called multiple times throughout recording (between start and stop).
Call applyrecord
to request a resource ID (resid) for cloud recording.
After calling this method, you can obtain this ID from the resid
field in the HTTP response body. This resid remains valid for five minutes, so you need to use it for recording within that timeframe.
You can only use one resid at a time.
See detailed request and response samples in applyrecord
Samples.
Call startrecord
within five minutes of obtaining the resid to join the channel and start recording.
After calling this method, you can get a recordid from the HTTP response body. This recordid is a unique identifier for a single recording period.
See detailed request and response samples in startrecord
Samples.
Once recording has started, you can call stoprecord
to stop recording.
When the channel remains idle (no users) beyond the preset time (default is 30s), cloud recording will also automatically exit the channel and stop recording. Contact Customer Support for special configurations.
See detailed request and response samples in stoprecord
Samples.
Once recording has started, you can call updatemixrecord
to update the stream mixing layout for recording.
See request and response samples in updatemixrecord
Samples.
The meanings of the fields in the file name are as follows:
recordid: Recording task ID
roomid: ID of the room to be recorded
uid: User ID
rid, uid_s, uid_e: Fixed words
The Jocloud background server performs TS slicing on the live media stream and continuously uploads it to the specified OSS storage path. One M3U8 file will be generated when the recording file is completed.