Skip to content

连接websocket

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

请求参数

参数必选类型描述
typestring登录方式:key-签名,push_url-推流地址
push_serverstring服务器地址,地址需要url编码。推流地址方式下必填
push_stream_codestring推流码,地址需要url编码。推流地址方式下必填
keystringkey。签名方式下必填
signstring签名。签名方式下必填
room_idstring直播间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

响应参数

参数必选类型描述
typestring固定返回值response
codestring状态码:400-失败
fail_msgstring失败内容

响应示例

{
    "type": "response",
    "code": 400,
    "fail_msg": "type must be in key,push_url"
}

连接socketIo

创建连接不需要提交额外参数

http
wss://wss-b-socketio.nuoyun.tv