Help Center/ SparkRTC/ API Reference/ Appendix/ Receiving a Recording Event Callback Notification
Updated on 2022-10-08 GMT+08:00

Receiving a Recording Event Callback Notification

When SparkRTC calls back an API provided by a user, the following information is attached:

Table 1 Request body parameter description

Parameter

Mandatory

Data Type

Description

job_id

No

String

Job ID, which can be used to modify, view, and stop a recording job.

stream_name

No

String

Stream name

app_id

No

String

Application ID

room_id

No

String

Room ID

event_type

No

String

Notification event type:

  • RECORD_NEW_FILE_START: The recording module starts to create a file.
  • RECORD_FILE_COMPLETE: The recording module completes file generation.
  • CLOUD_RECORD_SERVER_OVER: The cloud-based recording job ends.

record_format

No

String

Recording format. The options are as follows:

  • HLS
  • MP4

download_url

No

String

Download address of OBS where the recording file is stored. The address cannot be used for content playback. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

record_duration

No

Long

Duration of a recording, in seconds. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

width

No

Integer

Width of a recording. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

height

No

Integer

Height of a recording. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

start_time

No

String

UTC time when the recording starts. The format is YYYY-MM-DDThh:mm:ssZ. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

end_time

No

String

UTC time when the recording ends. The format is YYYY-MM-DDThh:mm:ssZ. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

obs_location

No

String

OBS region where the file is stored. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

obs_bucket

No

String

OBS bucket where the file is stored. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

obs_object

No

String

Full path of the OBS bucket where the file is stored. This parameter is needed when event_type is set to RECORD_FILE_COMPLETE.

detail_message

No

String

Status description