跳转到内容

开始直播

Request

使用一个已完成上传且 uploadType=2 的 MP4 文件开始直播。仅支持具备直播能力的云手机。

请求超时后请先查询直播状态,再决定是否重试。业务错误包括 3330033301334013341899002

Bodyapplication/jsonrequired
phoneIdinteger, (int64)required

Cloud phone ID

Example:190000000000000000
fileIdinteger, (int64)required

ID of an uploaded MP4 live-streaming file (uploadType=2)

Example:820000000000000000
POST
/api/cloudphone/live/start
curl -i -X POST \
  http://127.0.0.1:40000/api/cloudphone/live/start \
  -H 'Content-Type: application/json' \
  -d '{
    "phoneId": 190000000000000000,
    "fileId": 820000000000000000
  }'

Responses

Request processed; inspect code for the business result

Bodyapplication/json
codeintegerrequired

Business result code; 0 indicates success

Example:0
msgstring or nullrequired

Error message; null when successful

Example:null
requestIdstringrequired

Request ID for troubleshooting

Example:"1d4f3ea968664593860b94b35d4ebf5e"
databooleanrequired

Whether the live-streaming operation succeeded

Response
{ "code": 0, "msg": null, "data": true, "requestId": "1d4f3ea968664593860b94b35d4ebf5e" }