查询云播放器
更新时间:2025-05-07
接口描述
云播放器查询接口,可以查询云播放器的基础信息和状态。
请求(Request)
请求URI
GET /v1/cloudplayer?appId={appId}&playerId={playerId} HTTP/1.1
参数名 | 类型 | 是否必需 | 描述 |
---|---|---|---|
appId | String | 是 | 应用ID |
playerId | String | 是 | 云播放器ID |
请求头域
除公共头域外,无其它特殊头域。
请求体
无
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
字段名 | 类型 | 描述 |
---|---|---|
playerId | String | 云播放器 ID |
playerName | String | 云播放器名称 |
streamUrl | String | 流地址 |
roomName | String | 房间名 |
userId | Long | 云播放器 uid |
createTime | Long | 创建时间,unix 时间戳,单位毫秒 |
status | String | 云播放器状态,支持如下取值: created:已创建; idle: 空闲中; running:运行中; failed:播放失败; deleted:已删除。 |
示例
请求示例
Plain Text
1GET /v1/cloudplayer?appId=testAppId&playerId=testPlayerId HTTP/1.1
2host: rtc.baidubce.com
3content-type: application/json
4authorization: {bce-authorization-string}
5x-bce-request-id: {bce-request-id}
响应示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: b06a9214-04d6-4a08-9f5d-966b04604cfb
3date: Mon, 05 Sep 2022 03:25:43 GMT
4transfer-encoding: chunked
5content-type: application/json;charset=UTF-8
6cache-control: no-cache
7{
8 "playerId": "testPlayerId",
9 "playerName": "player1",
10 "streamUrl": "http://***/***",
11 "roomName": "123456",
12 "userId": 123123,
13 "createTime": 1707031561638,
14 "status": "running"
15}