Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ SparkRTC/ User Guide/ Cloud Recording Management/ Configuring Recording Callback

Configuring Recording Callback

Updated on 2023-10-16 GMT+08:00

You can configure an HTTP/HTTPS URL to receive recording task status callback. SparkRTC will send POST requests to your server, so that you can know the recording task status.

Callback Protocols

  • Request: HTTP POST. The request body is in JSON format.
  • Response: HTTP STATUS CODE = 200. The response body is in JSON format. You can customize the response body.
    Example:
    { 
      "status": 1, 
      "result" : "success" 
    }

Prerequisites

You have created an app.

Procedure

  1. Log in to the SparkRTC console.
  2. In the navigation pane, choose Apps.
  3. Click Configure in the row of the app for which a recording callback needs to be created.

    The Configuration page is displayed.

  4. In the Recording Callback area, click Edit and configure callback information, as shown in Figure 1.

    Figure 1 Adding a callback URL
    • Callback URL: address of the server that receives callback information. Only the HTTP and HTTPS protocols are supported.
    • Private Key: authentication key for recording callback. The key can contain 32 to 64 characters. For details about how to generate a recording callback authentication signature, see "How Do I Authenticate a Recording Callback?" in FAQs.

Callback Example

Table 1 describes the fields in a callback message body.

{
  "event_type": "RECORD_FILE_COMPLETE",
  "stream_name": "mystream",
  "record_format": "HLS",
  "download_url": "https://abc-rtc-bucket2.obs.cn-north-4.myhuaweicloud.com/Record/Record/5fcdf5651xxxxxx6f835d0d4.SparkRTC.myhuaweicloud.com/live/continuous_record/hls/mystream_2021-04-28-08-57-07/mystream_2021-04-28-08-57-07.m3u8",
  "file_size": 26254952,
  "record_duration": 65,
  "start_time": "2021-04-28T08:56:57Z",
  "end_time": "2021-04-28T08:58:02Z",
  "width": 1280,
  "height": 720,
  "obs_location": "http://obs.cn-north-4.myhuaweicloud.com",
  "obs_bucket": "abc-rtc-bucket2",
  "obs_object": "Record/Record/5fcdf5651xxxxxx6f835d0d4.SparkRTC.myhuaweicloud.com/live/continuous_record/hls/mystream_2021-04-28-08-57-07/mystream_2021-04-28-08-57-07.m3u8",
  "app_id": "5fcdf5651xxxxxx6f835d0d4",
  "job_id": "608196a2fa1xxxxxx515147f32ef463b",
  "room_id": "room01"
}
Table 1 JSON message body

Field

Description

event_type

Notification event type.

Values:

  • RECORD_NEW_FILE_START. This event is triggered in either of the following scenarios:
    • The system starts creating the first recording file.
    • When a stream is resumed, if Max Stream Pause Length is set to Generate a new file when a stream is paused, the system starts creating another recording file.
    • If the current recording duration exceeds the configured recording length, the system starts creating another recording file.
  • RECORD_FILE_COMPLETE. This event is triggered in either of the following scenarios:
    • When the recording duration reaches the configured recording length, the current recording file recording is complete and the system starts creating another recording file.
    • When a stream is interrupted, if Max Stream Pause Length is set to Generate a new file when a stream is paused, the current recording file recording is complete.

stream_name

Stream name.

record_format

Recording format, which can be HLS and MP4.

download_url

URL for downloading the recording. This field is used only when event_type is RECORD_FILE_COMPLETE.

NOTE:

The address cannot be used for playback.

file_size

File size.

Unit: byte.

record_duration

Duration of a recording.

Unit: second.

This field is used only when event_type is RECORD_FILE_COMPLETE.

start_time

UTC time when the recording starts, which is, time when the first frame is received. The format is YYYY-MM-DDThh:mm:ssZ.

This field is used only when event_type is RECORD_FILE_COMPLETE.

end_time

UTC time when the recording ends. The format is YYYY-MM-DDThh:mm:ssZ.

This field is used only when event_type is RECORD_FILE_COMPLETE.

width

Width of the recording.

This field is used only when event_type is RECORD_FILE_COMPLETE.

height

Height of the recording.

This field is used only when event_type is RECORD_FILE_COMPLETE.

obs_location

Region where the OBS bucket for storing the recording is located.

This field is used only when event_type is RECORD_FILE_COMPLETE.

obs_bucket

OBS bucket where the recording is stored.

This field is used only when event_type is RECORD_FILE_COMPLETE.

obs_object

OBS storage path.

This field is used only when event_type is RECORD_FILE_COMPLETE.

app_id

App ID.

job_id

Recording task ID, which can be used to modify, view, or stop the task.

room_id

Room ID.

detail_message

Recording task status description.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback