Get RTSP/HLS Live Stream URL

Last Updated on : 2023-07-12 02:45:35download

This topic describes how to get the URL of live streaming over RTSP and HLS protocols.

API description

Get the URL of live streaming over RTSP/HLS protocols.

API endpoint

POST: /v1.0/users/{uid}/devices/{device_id}/stream/actions/allocate

Request parameters

Parameter name Type Location Required Description
uid String uri true The user ID.
device_id String uri true The device ID.

Return parameters

Parameter name Type Description
result StreamVO The returned result.

Description of result

Parameter name Type Description
url String The URL of live streaming.

Sample request

POST: /v1.0/users/ay156402688xxxxvoY5W/devices/6c08578d894xxxx11afye1/stream/actions/allocate
{
  "type": "hls"
}

Sample response

{
    "result": {
        "url": "https://wework1.wgine.com:554/hls/6c08578d894xxx411afye1/c146ioh525qd7j2l1590315x7E7xNu6PW3kXSfQL.m3u8?signInfo=PnwWBVmaoNSubTJ7Fb1cjsJNXZeuXn%2F2k2FFwNS6EuYlD5f3UtciKvNxIyYUHsKvODeI6nmDP3y51sWbXVfqbFu6q9PDNDG005cRkSWnfzA%2BxYuq1JMeJoJvWb8uJd5YNtMlbGcsQ81knGoMXCDtJC9fyY%2FPkEyXQyGntlHzVd0%3D"
    },
    "t": 1615358306701,
    "success": true
}

Error codes

For more information, see Global Error Codes.