Skip to content

连接websocket ​

创建websocket连接时携带请求参数,连接失败返回失败信息,连接成功不返回消息。

请求参数 ​

参数必选类型描述
type是string登录方式:key-签名,push_url-推流地址
push_server否string服务器地址,地址需要url编码。推流地址方式下必填
push_stream_code否string推流码,地址需要url编码。推流地址方式下必填
key否stringkey。签名方式下必填
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