Update layout
Updated
Updates the video mixing layout of an active composite recording.
https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/updateLayoutAfter starting a composite recording, call this endpoint to update the video mixing layout.
- Each call to this endpoint overwrites all previous layout settings. For example, if you set
backgroundColorto"#FF0000"when starting a recording and callupdateLayoutwithout settingbackgroundColoragain, the background color reverts to the default value"#000000". - This endpoint is only valid within an active recording session. If the recording was not started successfully or has already ended, the request returns
404. - If you need to call
updateLayoutmultiple times in succession, wait for the previous response before sending the next request to avoid unexpected results.
Path Parameters
The App ID of your project. Use the same App ID as the channel being recorded. Ensure that the cloud recording service has been enabled for this App ID.
The resource ID obtained from the acquire endpoint.
The recording ID obtained from the start endpoint.
Header Parameters
Request Body
application/json
Response
-
If the returned status code is
200, the request was successful. -
If the returned status code is not
200, the request failed. See Response status codes for troubleshooting.
Response Body
application/json
Response schema
200application/jsonThe request succeeded.
The cloud recording resource ID. Valid for five minutes; re-request from acquire if expired.
The resource ID used by cloud recording.
The recording ID. Uniquely identifies a recording session. Generated after the cloud recording service starts successfully.
The recording ID, identifying the current recording session.
The name of the channel to be recorded.
The name of the channel being recorded.
The UID used by the cloud recording service in the RTC channel.
defaultapplication/jsonThe request failed. If the HTTP status code is not 200, see the Cloud Recording response status codes for troubleshooting.
Response example
{
"code": 404,
"reason": "failed to find worker"
}
Request examples
curl --request POST \ --url https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/mix/updateLayout \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "cname": "httpClient463224", "uid": "527841", "clientRequest": { "mixedVideoLayout": 3, "backgroundColor": "#FF0000", "layoutConfig": [ { "uid": "1", "x_axis": 0.1, "y_axis": 0.1, "width": 0.1, "height": 0.1, "alpha": 1, "render_mode": 1 }, { "uid": "2", "x_axis": 0.2, "y_axis": 0.2, "width": 0.1, "height": 0.1, "alpha": 1, "render_mode": 1 } ] } }'Response example
{ "cname": "string", "uid": "string", "resourceId": "string", "sid": "string"}