Appearance
连接websocket
创建websocket连接时携带请求参数,连接失败返回失败信息,连接成功不返回消息。
请求参数
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
type | 是 | string | 登录方式:key-签名,push_url-推流地址 |
push_server | 否 | string | 服务器地址,地址需要url编码。推流地址方式下必填 |
push_stream_code | 否 | string | 推流码,地址需要url编码。推流地址方式下必填 |
key | 否 | string | key。签名方式下必填 |
sign | 否 | string | 签名。签名方式下必填 |
room_id | 否 | string | 直播间Id。签名方式下必填 |
请求示例
wss://wss-b.nuoyun.tv?type=push_url&push_server=rtmp%3A%2F%2Flvvq-publish.live.nuoyun.tv%2Fwx&push_stream_code=qexxtzf%3FtxSecret%3Df55xxx7c19d4ac1d3f3bc2501%26txTime%3D65FF7C67
响应参数
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
type | 是 | string | 固定返回值response |
code | 是 | string | 状态码:400-失败 |
fail_msg | 是 | string | 失败内容 |
响应示例
{
"type": "response",
"code": 400,
"fail_msg": "type must be in key,push_url"
}
连接socketIo
创建连接不需要提交额外参数
http
wss://wss-b-socketio.nuoyun.tv