跳转到内容

查询直播状态

Request

查询云手机当前是否正在直播。

  • 前置条件:云手机必须属于你的团队,且机型必须支持直播。与开始和停止不同,本接口不要求云手机已开机或被你占用。
  • 副作用:无。只读。可带退避安全重试。
  • 取值:liveStatus 为 0(未直播)或 1(直播中)。没有失败状态——未生效的开始只会一直停在 0,所以轮询必须设超时上限。

已记录的业务错误码:33300, 33401。 各错误码的含义见 Error Codes。任何接口还可能返回通用错误码。

Bodyapplication/jsonrequired
phoneIdstringrequired

Cloud phone ID

Example:"190000000000000001"
curl -i -X POST \
  http://127.0.0.1:40000/api/cloudphone/live/status \
  -H 'Content-Type: application/json' \
  -d '{
    "phoneId": "190000000000000001"
  }'

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"
dataobjectrequired
Response
{ "code": 0, "msg": null, "data": { "liveStatus": 1, "writeFileId": "820000000000000001", "liveFilePath": null }, "requestId": "1d4f3ea968664593860b94b35d4ebf5e" }