https://xxxxxx/v4/live_engine_http_srv/add_relay_room?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名: 中国: console.tim.qq.com新加坡: adminapisgp.im.qcloud.com硅谷: adminapiusa.im.qcloud.com雅加达: adminapiidn.im.qcloud.com |
v4/live_engine_http_srv/add_relay_room | 添加转发子房间接口。 |
sdkappid | |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295。 |
contenttype | 请求格式固定值为 json。 |
{"RoomId": "main-room-001","RelayRoomIdList": ["child-room-001", "child-room-002", "child-room-003"]}
字段 | 类型 | 属性 | 说明 |
RoomId | String | 必填 | 主房间 ID。主房间是内容的源头,其混流画面将被转发到所有子房间。 |
RelayRoomIdList | Array of String | 必填 | 转发子房间 ID 列表: 单次最多 5 个子房间; 子房间必须是已创建的房间; 子房间不能是另一个主房间; 子房间不能已绑定到其他主房间(但绑定到同一主房间视为幂等成功)。 |
操作 | 说明 |
连线(Connection) | 子房间不能发起或接受连线邀请。 |
上麦(TakeSeat) | 子房间内观众不能上麦。 |
PK(Battle) | 子房间不能参与 PK 对战。 |
主房间模板分类 | 子房间转发使用的模板 | 说明 |
竖屏视频 | VideoPortrait10Seats | 竖屏动态 1v9 浮动布局。 |
横屏视频 | VideoLandscapeAudioMix10Seats | 横屏动态 1v9 布局。 |
音频(语聊房/KTV) | Karaoke | KTV 玩法语音混流。 |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"RequestId": "Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","Response": {"ResultList": [{"RoomId": "child-room-001","ErrorCode": 0,"ErrorInfo": ""},{"RoomId": "child-room-002","ErrorCode": 0,"ErrorInfo": ""},{"RoomId": "child-room-003","ErrorCode": 0,"ErrorInfo": ""}]}}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"RequestId": "Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","Response": {"ResultList": [{"RoomId": "child-room-001","ErrorCode": 0,"ErrorInfo": ""},{"RoomId": "child-room-004","ErrorCode": 100002,"ErrorInfo": "child room not exist"}]}}
字段 | 类型 | 说明 |
ActionStatus | String | 请求处理的结果: OK 表示处理成功; FAIL 表示失败。 |
ErrorCode | Integer | 错误码: 0:表示成功; 非0:表示整体请求失败。 |
ErrorInfo | String | 错误信息。 |
RequestId | String | 唯一请求 ID,每次请求都会返回,定位问题时需要提供该次请求的 RequestId。 |
Response.ResultList | Array | 每个子房间的操作结果列表,顺序与请求中的 RelayRoomIdList 一致。 |
Response.ResultList[i].RoomId | String | 子房间 ID。 |
Response.ResultList[i].ErrorCode | Integer | 该子房间的操作结果。0 表示成功,非 0 表示失败。 |
Response.ResultList[i].ErrorInfo | String | 该子房间的错误信息。 |
错误码 | 含义说明 |
100001 | 服务器内部错误,请重试。 |
100002 | 请求参数非法,请根据错误描述检查请求是否正确。常见原因:子房间不存在、RelayRoomIdList 为空。 |
100006 | 权限不足。常见原因:非 REST API 调用(端上 SDK 不允许调用此接口)、非房主且非管理员调用。 |
100012 | 操作频率超限。同一主房间每秒仅允许 1 次转发写操作。 |
100027 | 操作进行中。同一主房间有另一个转发写操作正在执行,请稍后重试。 |
{"RoomInfo": {"RoomId": "main_room_001","RoomType": "Live","Owner_Account": "anchor_001","TakeSeatMode": "ApplyToTake","SeatTemplate": "VideoDynamicGrid9Seats","RoomName": "主舞台直播间"}}
{"RoomInfo": {"RoomId": "child_room_001","RoomType": "Live","Owner_Account": "admin_001","SeatTemplate": "VideoDynamicGrid9Seats","RoomName": "分会场A"}}
SeatTemplate 在转发期间不生效,强制使用主房间模板对应的转发模板。单个主房间最多绑定 50 个子房间。{"RoomId": "main_room_001","RelayRoomIdList": ["child_room_001", "child_room_002", "child_room_003"]}
能力 | 主房间 | 子房间 |
观看直播 | ✓ | ✓(主房间画面) |
上麦 | ✓ | × |
连线 | ✓ | × |
PK | ✓ | × |
文档反馈