https://xxxxxx/v4/live_engine_http_srv/set_mix_stream?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameters | Description |
xxxxxx | The reserved domain for the country/region where the SDKAppID is located: Others in China: console.tim.qq.comSingapore: adminapisgp.im.qcloud.comSilicon Valley: adminapiusa.im.qcloud.comJakarta: adminapiidn.im.qcloud.com |
v4/live_engine_http_srv/set_mix_stream | Request API. |
sdkappid | Create an assigned SDKAppID for the Live application. |
identifier | |
usersig | The generated signature of the App administrator account. For specific operations, see Generating UserSig. |
random | Enter a random 32-bit unsigned integer in the range of [0,4294967295]. |
contenttype | The request format has a fixed value of json. |
{"RoomId":"mix1","LayoutMode":0, //grid mode"VideoEncode":{"Width":720,"Height":1280}}
{"RoomId":"mix1","LayoutMode":1000,"VideoEncode":{"Width":720,"Height":1280},"LayoutInfo":{"LayoutList":[{"LocationX":0,"LocationY":0,"ImageWidth":360,"ImageHeight":1280,"RoomId":"mix1","Member_Account":"brennanli","StreamType":0,"ZOrder":1},{"LocationX":360,"LocationY":0,"ImageWidth":360,"ImageHeight":1280,"RoomId":"mix1","Member_Account":"tandy","StreamType":0,"ZOrder":1},{ // audio-only presentation without video display"LocationX":0,"LocationY":0,"ImageWidth":0,"ImageHeight":0,"RoomId":"mix1","Member_Account":"faker","StreamType":0,"ZOrder":1},]}}
{"RoomId":"mix1","LayoutMode":1000,"VideoEncode":{"Width":720,"Height":1280},"LayoutInfo":{"LayoutList":[{"LocationX":540,"LocationY":960,"ImageWidth":180,"ImageHeight":320,"RoomId":"mix1","Member_Account":"brennanli","StreamType":0,"ZOrder":1}],"MaxUserLayout":{"RoomId":"mix1","Member_Account":"tandy","StreamType":0,"ZOrder":0}}}
{"RoomId":"mix1","LayoutMode":1000,"VideoEncode":{"Width":720,"Height":1280},"LayoutInfo":{"LayoutList":[{"LocationX":630,"LocationY":0,"ImageWidth":90,"ImageHeight":160,"RoomId":"mix1","Member_Account":"brennanli","StreamType":0,"ZOrder":1}],"MaxUserLayout":{"RoomId":"mix1","Member_Account":"brennanli","StreamType":1,"ZOrder":0}}}
Field | Type | Required | Description |
RoomId | String | Required | room ID, up to 48 bytes. |
LayoutMode | Integer | Required | Layout mode, defaults to 0: 0 means the default 9-grid view, single-stream bypass relay, multi-stream transcode mixing. 1000 means custom mode. In custom mode, fields such as VideoEncode and LayoutInfo need to be set, and all streams must always go through the mix-transcoding pipeline. |
VideoEncode | Object | Optional | Resolution information, defaulting to 720P: Valid in custom mode. In 9-grid view, if there is only one anchor in the room, bypass forwarding will be performed. Filling in this parameter is invalid. |
Width | Integer | Optional | Video resolution width. |
Height | Integer | Optional | High video resolution. |
LayoutInfo | Object | Optional | Mixed stream layout information, this field is valid only in custom mode. |
LayoutList | Array | Optional | Mixed stream anchor layout information, this field is valid only in custom mode. |
MaxUserLayout | Object | Optional | Large screen in floating window during screen sharing, this field is valid only in custom mode. |
Field | Type | Required | Description |
LocationX | Integer | Required | The anchor's position on the x-axis in the picture. |
LocationY | Integer | Required | The anchor's position on the y-axis in the picture. |
ImageWidth | Integer | Required | The width of the anchor in the picture. |
ImageHeight | Integer | Required | The height of the anchor in the picture. |
Member_Account | String | Required | Anchor Account Id. |
StreamType | Integer | Required | Stream type: 0 indicates camera stream. 1 indicates screen sharing stream. |
ZOrder | Integer | Required | Anchor visual hierarchy: 0 refers to the bottom-level. |
RoomId | String | Required | The room id corresponding to the anchor. |
Field | Type | Required | Description |
Member_Account | String | Required | Anchor Account Id. |
StreamType | Integer | Required | Stream type: 0 indicates camera stream. 1 indicates screen sharing stream. |
ZOrder | Integer | Required | Anchor visual hierarchy: 0 refers to the bottom-level. |
RoomId | String | Required | The room id corresponding to the anchor. |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"RequestId": "Id-8c9858f01e954611ae2d4c1b1ed7d583-O-Seq-52720"}
Field | Type | Description |
ActionStatus | String | Request processing result. OK indicates successful processing. FAIL indicates failure. |
ErrorCode | Integer | Error code, 0 indicates success, non-zero indicates failure. |
ErrorInfo | String | Error message. |
RequestId | String | Unique request ID. It is returned for each request. RequestId is required for locating a problem. |
Error Code | Description |
100001 | Internal server error, please retry. |
100002 | Invalid parameter. Check whether the request is correct according to the error description. |
100006 | The room type required is the Live room type. |
100004 | Room does not exist or is dissolved. |
100007 | The paid plan fails to satisfy. |
100422 | Too many requests in a short time, subject to frequency control. The total mixing operations of each sdkappid are limited to 20 per second. |
100424 | Mix stream task does not exist. Retry. |
100427 | The mixing operation in this room is too fast. Please try again later. |
피드백