浏览代码

add:增加多点登录被踢下线的client的client-banned回调

adam 4 年前
父节点
当前提交
7c16efa81f
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      AgoraRTCSDK.min.js

+ 8
- 0
AgoraRTCSDK.min.js 查看文件

9401
 						default.debug("[".concat(b.clientId, "] quit gateway")), b.state = S, b.socket.close(), O()) : "recover" === e && A()
9401
 						default.debug("[".concat(b.clientId, "] quit gateway")), b.state = S, b.socket.close(), O()) : "recover" === e && A()
9402
             },
9402
             },
9403
             b.socket.on("on_notification", function(e) {
9403
             b.socket.on("on_notification", function(e) {
9404
+              if(e.detail === "ERR_REPEAT_JOIN") {
9405
+                var t = l({
9406
+                  type: "client-banned",
9407
+                  uid: e.uid,
9408
+                  attr: "onMultiIP"
9409
+                });
9410
+                b.dispatchEvent(t)
9411
+              }
9404
 							if (o.
9412
 							if (o.
9405
 						default.debug("[".concat(b.clientId, "] Receive notification: "), e), "ERR_JOIN_BY_MULTI_IP" === I.GatewayErrorCode[e.code]) {
9413
 						default.debug("[".concat(b.clientId, "] Receive notification: "), e), "ERR_JOIN_BY_MULTI_IP" === I.GatewayErrorCode[e.code]) {
9406
 							return b.dispatchEvent({
9414
 							return b.dispatchEvent({