Stop a cloud recording task
https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/stopCall this endpoint to leave the channel and stop cloud recording. To start recording again after stopping, call acquire to get a new resource ID.
- 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. - In non-web page recording modes, if the channel is idle for longer than the
maxIdleTimevalue set instart(default 30 seconds), cloud recording automatically leaves the channel and stops.
Request
Path parameters
The App ID of your project.
- For web page recording mode, enter the App ID for which the cloud recording service is enabled.
- For individual and composite recording modes, use the same App ID as the channel to be 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.
The recording mode:
individual: Individual recording mode.mix: Composite recording mode.web: Web page recording mode.
Request body
BODYrequired
- clientRequest objectrequired
Show propertiesHide properties
- async_stop booleannullable
Default:
falseThe response mechanism for the
stoprequest:true: Asynchronous. Returns a response immediately after the request is received, without waiting for the recording files to finish uploading.false: Synchronous. Returns a response only after all recorded files have been uploaded to third-party cloud storage. Agora expects the upload to complete within 20 seconds. If it exceeds this limit, the response returns error code50.
Response
Response body
-
If the returned status code is
200, the request was successful.OK
- cname string
The name of the channel being recorded.
- uid string
The UID used by the cloud recording service in the RTC channel.
- resourceId string
The resource ID used by cloud recording.
- sid string
The recording ID, identifying the current recording session.
- serverResponse object
The recording stop status. The fields returned vary depending on the recording mode and whether screenshot capture is enabled.
Show propertiesHide properties
- extensionServiceState array[object]
State of each extension service at the time of stopping. Only returned in web page recording mode.
Show propertiesHide properties
- serviceName string
Extension service name:
"upload_service": Upload service."web_recorder_service": Web page recording service.
- payload object
Service-specific state at the time of stopping.
Show propertiesHide properties
- uploadingStatus string
Upload status of the recording files. Only returned by
upload_service."uploaded": All recording files have been uploaded to the specified third-party cloud storage."backuped": All files have been uploaded, but at least one TS file was uploaded to Agora backup cloud. The Agora server will automatically continue uploading to the designated third-party cloud storage."unknown": Unknown status.
- fileList array[object]
Files generated during recording. Only returned by
web_recorder_service.Show propertiesHide properties
- filename string
Name of the M3U8 or MP4 file.
- sliceStartTime number
Recording start time of the file, Unix timestamp in seconds.
- onhold boolean
Whether recording was paused at the time of stopping.
trueif paused,falseif running. Only returned byweb_recorder_service. - state string
Upload status of the extension service. Only returned by
web_recorder_service."init": Initializing."inProgress": Running."exit": Stopped.
- uploadingStatus string
Upload status of the recording files. Only returned in individual recording mode when screenshot capture is enabled, and in individual and composite recording modes when screenshot capture is not enabled.
"uploaded": All recording files have been uploaded to the specified third-party cloud storage."backuped": All files have been uploaded, but at least one TS file was uploaded to Agora backup cloud. The Agora server will automatically continue uploading to the designated third-party cloud storage."unknown": Unknown status.
- fileListMode string
Data format of
fileList. Only returned in individual and composite recording modes when screenshot capture is not enabled."string": In composite recording mode whenavFileTypeis["hls"]."json": WhenavFileTypeis["hls","mp4"]in individual or composite recording mode.
- fileList string or array[object]
The recorded files. Only returned in individual and composite recording modes when screenshot capture is not enabled. When
fileListModeis"string", this is the filename of the M3U8 file. WhenfileListModeis"json", this is an array of objects with the following fields:Show propertiesHide properties
- fileName string
Name of the M3U8 or MP4 file.
- trackType string
File type:
"audio": Audio only."video": Video only."audio_and_video": Audio and video.
- uid string
The UID whose stream is recorded. In composite recording mode, this is
"0". - mixedAllUser boolean
trueif all users are recorded in a single file;falseif each user is recorded separately. - isPlayable boolean
trueif the file can be played online;falseif it cannot. - sliceStartTime number
Recording start time of the file, Unix timestamp in seconds.
-
If the returned status code is not
200, the request failed. See Response status codes for troubleshooting.