2.3.2、Play Audio

To avoid transcoding audio in real time only when playing it, transcode the audio in advance in the previous step.

POSTProduction: https://open.eye4cloud.com/{{open_id}}/open/v1/sound/play
Request Data
Field Name Required Type Description
position Yes string Audio Storage Location
timestamp Yes int64 Timestamp in seconds
nonce Yes string Random string, 8-20 characters
sign Yes string See "Sign Generation Examples" for the implementation details
When generating sign, set data to: "positon=${position}"
data No string Device DATA; an empty string can be passed
imei No string Device IMEI; an empty string can be passed
CURL Request Example
CURL
curl 'https://open.eye4cloud.com/{{open_id}}/open/v1/sound/play' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "url": "xxx",
    "type": "xxx",
    "position": "xxx",
    "timestamp": 1757472185,
    "nonce": "",
    "sign": "",
}'
Response Data
Field Name Type Description
error_code int Status code: 0 indicates success; other values indicate an error
error_message string Error message; success indicates a normal response
data object {}

Example:

JSON
{
    "error_code": 0,
    "error_message": "success",
    "error_tips": "",
    "data": {}
}