From cc13ddc9ffa5cb7a2c7654282dc8302b9bf69be7 Mon Sep 17 00:00:00 2001 From: Jianjun Zhu Date: Fri, 23 Apr 2021 12:59:34 +0800 Subject: [PATCH] Remove os and runtime fron UA info. --- src/sdk/conference/client.js | 3 ++- src/sdk/p2p/peerconnection-channel.js | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sdk/conference/client.js b/src/sdk/conference/client.js index 48d2d922..dc528472 100644 --- a/src/sdk/conference/client.js +++ b/src/sdk/conference/client.js @@ -391,9 +391,10 @@ export const ConferenceClient = function(config, signalingImpl) { signalingState = SignalingState.CONNECTING; + const sysInfo = Utils.sysInfo(); const loginInfo = { token: tokenString, - userAgent: Utils.sysInfo(), + userAgent: {sdk: sysInfo.sdk}, protocol: protocolVersion, }; diff --git a/src/sdk/p2p/peerconnection-channel.js b/src/sdk/p2p/peerconnection-channel.js index fa440ed7..3847ae71 100644 --- a/src/sdk/p2p/peerconnection-channel.js +++ b/src/sdk/p2p/peerconnection-channel.js @@ -100,7 +100,7 @@ class P2PPeerConnectionChannel extends EventDispatcher { this._settingRemoteSdp = false; this._disposed = false; this._createPeerConnection(); - this._sendSignalingMessage(SignalingType.UA, sysInfo); + this._sendUa(sysInfo); } /** @@ -231,6 +231,11 @@ class P2PPeerConnectionChannel extends EventDispatcher { this._remoteId, this._connectionId, SignalingType.SDP, sdp); } + _sendUa(sysInfo) { + const ua = {sdk: sysInfo.sdk, capabilities: sysInfo.capabilities}; + this._sendSignalingMessage(SignalingType.UA, ua); + } + _sendSignalingMessage(type, message) { return this._signaling.sendSignalingMessage( this._remoteId, this._connectionId, type, message);