NEW FlightHub 2 OpenAPI V1.0
  1. Livestream Push
NEW FlightHub 2 OpenAPI V1.0
  • Root Directory
    • authentication
      • Authentication Tutorial
    • System Service
      • Query FlightHub 2 system status
    • Organize Projects
      • Organize Project Tutorial
      • Get the list of projects under the organization
      • Get the list of devices under the organization
      • Obtain the list of devices under the project
      • Obtain storage upload credentials for the project
      • Add personnel to the project
    • Device Management
      • Device Management Tutorial
      • Device Model Retrieval
      • HMS Information Retrieval
      • Real-time control command distribution
      • Dock camera switch
      • Aircraft Lens Switching
      • Control acquisition
      • Release control
      • Video transmission clarity settings
      • Custom Network RTK Calibration
    • Livestream Management
      • Livestream Management Tutorial
      • Livestream Push
        • Start livestream
          POST
      • Bypass Streaming
        • Stream forwarding error code
        • Create Stream Forwarder
        • Enable/Disable stream forwarder
        • Get stream transcoder list
        • Delete stream forwarder
    • Task Management
      • Task Management Tutorial
      • Create Flight Task
      • Updated flight task status
      • Obtain flight task list
      • Obtain media resources generated by the Flight task
      • Obtain Flight task trajectory information
      • Obtain Flight task information
    • Flight Route Management
      • Flight Route Management Tutorial
      • Flight Route Upload Completion Notification
      • Get the list of flight routes under the project
      • Get flight route details
    • Model Management
      • Model Management Tutorial
      • Model reconstruction coordinate system
      • Get the list of models under the project
      • Get Model Details
      • Model reconstruction
    • Annotation Management
      • Annotation Management Tutorial
      • Create map annotation
  1. Livestream Push

Start livestream

Developing
POST
/openapi/v0.1/live-stream/start
Start the livestream to broadcast the aircraft's stream to users in real-time.
The camera_index information can be obtained from the data.list.drone.camera_list in the device list interface under the organization.
The livestream will stop streaming if there are no viewers after 5 minutes.

Request

Header Params
X-Request-Id
string <uuid>
required
Request Unique Identifier
X-Language
enum<string> 
optional
Allowed values:
zhen
Default:
zh
X-Project-Uuid
string 
optional
Project Number
Default:
{{X-Project-Uuid}}
Body Params application/json
sn
string 
required
camera_index
string 
required
video_expire
integer 
required
Livestream streaming token validity period, exceeding this limit will terminate the livestream.
quality_type
enum<string> 
required
Livestream clarity
Allowed values:
adaptivesmoothultra_high_definition
Example
{
  "sn": "7CTDM3D00BZNVZ",
  "camera_index": "165-0-7",
  "video_expire": 7200,
  "video_quality": "adaptive"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/openapi/v0.1/live-stream/start' \
--header 'X-Request-Id;' \
--header 'X-Language: zh' \
--header 'X-Project-Uuid: {{X-Project-Uuid}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sn": "7CTDM3D00BZNVZ",
    "camera_index": "165-0-7",
    "video_expire": 7200,
    "video_quality": "adaptive"
}'

Responses

🟢200Success
application/json
Body
code
integer 
required
Non-zero indicates an exception
message
string 
required
Message prompt
data
object 
required
expire_ts
integer 
required
Livestream push stream token validity
url
string 
required
Livestream pull stream playback address
url_type
string 
required
Livestream push stream type
Example
{
  "code": 0,
  "message": "",
  "data": {
    "expire_ts": 1764751629,
    "url": "http://47.96.144.147:30806/rtc/v1/whep/?app=live&stream=7CTDM3D00BZNVZ_165-0-7&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9kdWN0X2lkIjoiNzEzNTE5ZmIxYjRlNDRiYTlkMjdkMDJhOGRlZDk5NGQiLCJjaGFubmVsX25hbWUiOiI3Q1RETTNEMDBCWk5WWl8xNjUtMC03IiwidWlkIjoxMDAxMTQsImFjdGlvbiI6InBsYiLCJleHAiOjE3NjQ3NTE2MzAsIm5iZiI6MTczMzIxNTYzMCwiaWF0IjoxNzMzMjE1NjMwfQ. _AysitutpprlgYGFy4lDL_gSv4Y3hl_te-yxoFVHZb4",
    "url_type": "srs"
  }
}
Previous
Livestream Management Tutorial
Next
Stream forwarding error code
Built with