podchat-browser 12.5.2-snapshot.3 → 12.5.2-snapshot.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +13 -0
- package/chat-js-browser-sdk.zip +0 -0
- package/examples/bundle-test.js +52 -33
- package/package.json +1 -1
- package/src/call.module.js +35 -16
- package/src/chat.js +1 -17
- package/src/events.module.js +16 -0
package/changelog.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented here.
|
|
4
4
|
to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.ir/pod/pod-basic-sdk/chat-js-browser-sdk/-/blob/master/changelog.md)
|
|
5
5
|
|
|
6
|
+
## [12.5.2-snapshot.5] - 2022-05-29
|
|
7
|
+
### Fixed
|
|
8
|
+
- User being muted when muting others
|
|
9
|
+
|
|
10
|
+
## [12.5.2-snapshot.4] - 2022-05-29
|
|
11
|
+
### Changed
|
|
12
|
+
- Improved call error logs in Sentry
|
|
13
|
+
|
|
14
|
+
## [12.5.2-snapshot.3] - 2022-05-24
|
|
15
|
+
### Changed
|
|
16
|
+
- Update sentry url
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [12.5.2-snapshot.2] - 2022-05-24
|
|
7
20
|
### Changed
|
|
8
21
|
- Update async package
|
|
Binary file
|
package/examples/bundle-test.js
CHANGED
|
@@ -56261,12 +56261,10 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56261
56261
|
|
|
56262
56262
|
var Utility = params.Utility,
|
|
56263
56263
|
currentModuleInstance = this,
|
|
56264
|
-
Sentry = params.Sentry,
|
|
56265
56264
|
asyncClient = params.asyncClient,
|
|
56266
56265
|
chatEvents = params.chatEvents,
|
|
56267
56266
|
chatMessaging = params.chatMessaging,
|
|
56268
56267
|
token = params.token,
|
|
56269
|
-
messagesCallbacks = {},
|
|
56270
56268
|
asyncRequestTimeouts = {},
|
|
56271
56269
|
chatMessageVOTypes = {
|
|
56272
56270
|
CREATE_THREAD: 1,
|
|
@@ -56437,7 +56435,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56437
56435
|
currentCallParams = {},
|
|
56438
56436
|
currentCallId = null,
|
|
56439
56437
|
newCallId = null,
|
|
56440
|
-
shouldReconnectCallTimeout = null,
|
|
56438
|
+
//shouldReconnectCallTimeout = null,
|
|
56441
56439
|
callMetaDataTypes = {
|
|
56442
56440
|
POORCONNECTION: 1,
|
|
56443
56441
|
POORCONNECTIONRESOLVED: 2,
|
|
@@ -56466,7 +56464,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56466
56464
|
callStopQueue = {
|
|
56467
56465
|
callStarted: false,
|
|
56468
56466
|
},
|
|
56469
|
-
callServerName,
|
|
56470
56467
|
callServerController = new callServerManager(),
|
|
56471
56468
|
messageTtl = params.messageTtl || 10000,
|
|
56472
56469
|
config = {
|
|
@@ -56718,7 +56715,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56718
56715
|
options.sendSource = 'screen';
|
|
56719
56716
|
resolve(options);
|
|
56720
56717
|
}).catch(function (error) {
|
|
56721
|
-
|
|
56718
|
+
let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
|
|
56719
|
+
console.error(errorString);
|
|
56720
|
+
chatEvents.fireEvent('callEvents', {
|
|
56721
|
+
type: 'CALL_ERROR',
|
|
56722
|
+
code: 7000,
|
|
56723
|
+
message: errorString,
|
|
56724
|
+
environmentDetails: getSDKCallDetails()
|
|
56725
|
+
});
|
|
56722
56726
|
explainUserMediaError(error, 'video', 'screen');
|
|
56723
56727
|
//resolve(options);
|
|
56724
56728
|
});
|
|
@@ -56758,7 +56762,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56758
56762
|
config.state = peerStates.CONNECTING;
|
|
56759
56763
|
config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
|
|
56760
56764
|
if (err) {
|
|
56761
|
-
|
|
56765
|
+
let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
|
|
56766
|
+
console.error(errorString);
|
|
56767
|
+
chatEvents.fireEvent('callEvents', {
|
|
56768
|
+
type: 'CALL_ERROR',
|
|
56769
|
+
code: 7000,
|
|
56770
|
+
message: errorString,
|
|
56771
|
+
environmentDetails: getSDKCallDetails()
|
|
56772
|
+
});
|
|
56762
56773
|
return;
|
|
56763
56774
|
}
|
|
56764
56775
|
|
|
@@ -56780,7 +56791,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56780
56791
|
} else {
|
|
56781
56792
|
config.peer.generateOffer((err, sdpOffer) => {
|
|
56782
56793
|
if (err) {
|
|
56783
|
-
|
|
56794
|
+
let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
|
|
56795
|
+
console.error(errorString);
|
|
56796
|
+
chatEvents.fireEvent('callEvents', {
|
|
56797
|
+
type: 'CALL_ERROR',
|
|
56798
|
+
code: 7000,
|
|
56799
|
+
message: errorString,
|
|
56800
|
+
environmentDetails: getSDKCallDetails()
|
|
56801
|
+
});
|
|
56784
56802
|
return;
|
|
56785
56803
|
}
|
|
56786
56804
|
manager.sendSDPOfferRequestMessage(sdpOffer, 1);
|
|
@@ -57732,7 +57750,8 @@ WildEmitter.mixin(WildEmitter);
|
|
|
57732
57750
|
el.setAttribute('id', 'uiRemoteAudio-' + user.audioTopicName);
|
|
57733
57751
|
el.setAttribute('class', callAudioTagClassName);
|
|
57734
57752
|
el.setAttribute('autoplay', '');
|
|
57735
|
-
|
|
57753
|
+
if(user.direction === 'send')
|
|
57754
|
+
el.setAttribute('muted', '');
|
|
57736
57755
|
el.setAttribute('controls', '');
|
|
57737
57756
|
}
|
|
57738
57757
|
|
|
@@ -57993,12 +58012,12 @@ WildEmitter.mixin(WildEmitter);
|
|
|
57993
58012
|
},
|
|
57994
58013
|
|
|
57995
58014
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
57996
|
-
chatEvents.fireEvent('callEvents', {
|
|
58015
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
57997
58016
|
type: 'CALL_ERROR',
|
|
57998
58017
|
code: 7000,
|
|
57999
58018
|
message: err,
|
|
58000
58019
|
environmentDetails: getSDKCallDetails()
|
|
58001
|
-
})
|
|
58020
|
+
});*/
|
|
58002
58021
|
|
|
58003
58022
|
const n = err.name;
|
|
58004
58023
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
|
@@ -60252,8 +60271,8 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60252
60271
|
|
|
60253
60272
|
//TODO: should be moved to event 113 when server fixes
|
|
60254
60273
|
|
|
60255
|
-
currentModuleInstance.pauseMice({});
|
|
60256
|
-
callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
60274
|
+
// currentModuleInstance.pauseMice({});
|
|
60275
|
+
// callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
60257
60276
|
|
|
60258
60277
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
60259
60278
|
onResult: function (result) {
|
|
@@ -60296,10 +60315,10 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60296
60315
|
}
|
|
60297
60316
|
|
|
60298
60317
|
//TODO: Should be moved to event from chat server (when chat server fixes the bug)
|
|
60299
|
-
var myId = chatMessaging.userInfo.id
|
|
60300
|
-
|
|
60318
|
+
//var myId = chatMessaging.userInfo.id
|
|
60319
|
+
//, myUser = callUsers[myId];
|
|
60301
60320
|
|
|
60302
|
-
if(myUser.audioStopManager.isStreamPaused()) {
|
|
60321
|
+
/* if(myUser.audioStopManager.isStreamPaused()) {
|
|
60303
60322
|
if (myUser.audioStopManager.isStreamStopped()){
|
|
60304
60323
|
callStateController.activateParticipantStream(
|
|
60305
60324
|
myId,
|
|
@@ -60313,7 +60332,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60313
60332
|
currentModuleInstance.resumeMice({});
|
|
60314
60333
|
}
|
|
60315
60334
|
myUser.audioStopManager.reset();
|
|
60316
|
-
}
|
|
60335
|
+
}*/
|
|
60317
60336
|
|
|
60318
60337
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
60319
60338
|
onResult: function (result) {
|
|
@@ -60643,7 +60662,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60643
60662
|
var asyncClient,
|
|
60644
60663
|
peerId,
|
|
60645
60664
|
oldPeerId,
|
|
60646
|
-
userInfo,
|
|
60647
60665
|
token = params.token,
|
|
60648
60666
|
generalTypeCode = params.typeCode || 'default',
|
|
60649
60667
|
mapApiKey = params.mapApiKey || '8b77db18704aa646ee5aaea13e7370f4f88b9e8c',
|
|
@@ -60664,17 +60682,13 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60664
60682
|
grantDeviceIdFromSSO = (params.grantDeviceIdFromSSO && typeof params.grantDeviceIdFromSSO === 'boolean')
|
|
60665
60683
|
? params.grantDeviceIdFromSSO
|
|
60666
60684
|
: false,
|
|
60667
|
-
messagesCallbacks = {},
|
|
60668
60685
|
messagesDelivery = {},
|
|
60669
60686
|
messagesSeen = {},
|
|
60670
60687
|
deliveryInterval,
|
|
60671
60688
|
deliveryIntervalPitch = params.deliveryIntervalPitch || 2000,
|
|
60672
60689
|
seenInterval,
|
|
60673
60690
|
seenIntervalPitch = params.seenIntervalPitch || 2000,
|
|
60674
|
-
sendMessageCallbacks = {},
|
|
60675
|
-
threadCallbacks = {},
|
|
60676
60691
|
getImageFromLinkObjects = {},
|
|
60677
|
-
asyncRequestTimeouts = {},
|
|
60678
60692
|
chatMessageVOTypes = {
|
|
60679
60693
|
CREATE_THREAD: 1,
|
|
60680
60694
|
MESSAGE: 2,
|
|
@@ -60850,10 +60864,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60850
60864
|
'THREAD': 2,
|
|
60851
60865
|
'CONTACTS': 3
|
|
60852
60866
|
},
|
|
60853
|
-
currentCallId = null,
|
|
60854
|
-
callTopics = {},
|
|
60855
|
-
webpeers = {},
|
|
60856
|
-
webpeersMetadata = {},
|
|
60857
60867
|
callRequestController = {
|
|
60858
60868
|
callRequestReceived: false,
|
|
60859
60869
|
callEstablishedInMySide: false,
|
|
@@ -60864,10 +60874,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60864
60874
|
return false;
|
|
60865
60875
|
}
|
|
60866
60876
|
},
|
|
60867
|
-
uiRemoteMedias = {},
|
|
60868
|
-
callStopQueue = {
|
|
60869
|
-
callStarted: false,
|
|
60870
|
-
},
|
|
60871
60877
|
systemMessageIntervalPitch = params.systemMessageIntervalPitch || 1000,
|
|
60872
60878
|
isTypingInterval,
|
|
60873
60879
|
protocol = params.protocol || 'websocket',
|
|
@@ -60880,7 +60886,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60880
60886
|
queueConnectionTimeout = params.queueConnectionTimeout,
|
|
60881
60887
|
socketAddress = params.socketAddress,
|
|
60882
60888
|
serverName = params.serverName || '',
|
|
60883
|
-
callServerName,
|
|
60884
60889
|
wsConnectionWaitTime = params.wsConnectionWaitTime,
|
|
60885
60890
|
connectionRetryInterval = params.connectionRetryInterval,
|
|
60886
60891
|
msgPriority = params.msgPriority || 1,
|
|
@@ -60888,7 +60893,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60888
60893
|
reconnectOnClose = params.reconnectOnClose,
|
|
60889
60894
|
asyncLogging = params.asyncLogging,
|
|
60890
60895
|
chatPingMessageInterval = 20000,
|
|
60891
|
-
sendPingTimeout,
|
|
60892
60896
|
getUserInfoTimeout,
|
|
60893
60897
|
config = {
|
|
60894
60898
|
getHistoryCount: 50
|
|
@@ -60981,14 +60985,13 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60981
60985
|
},
|
|
60982
60986
|
getUserInfoRetry = 5,
|
|
60983
60987
|
getUserInfoRetryCount = 0,
|
|
60984
|
-
chatState = false,
|
|
60985
60988
|
chatFullStateObject = {},
|
|
60986
60989
|
httpRequestObject = {},
|
|
60987
60990
|
connectionCheckTimeout = params.connectionCheckTimeout,
|
|
60988
60991
|
connectionCheckTimeoutThreshold = params.connectionCheckTimeoutThreshold,
|
|
60989
60992
|
httpRequestTimeout = (params.httpRequestTimeout >= 0) ? params.httpRequestTimeout : 0,
|
|
60990
60993
|
asyncRequestTimeout = (typeof params.asyncRequestTimeout === 'number' && params.asyncRequestTimeout >= 0) ? params.asyncRequestTimeout : 0,
|
|
60991
|
-
callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
60994
|
+
//callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
60992
60995
|
httpUploadRequestTimeout = (params.httpUploadRequestTimeout >= 0) ? params.httpUploadRequestTimeout : 0,
|
|
60993
60996
|
actualTimingLog = (params.asyncLogging.actualTiming && typeof params.asyncLogging.actualTiming === 'boolean')
|
|
60994
60997
|
? params.asyncLogging.actualTiming
|
|
@@ -74881,6 +74884,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74881
74884
|
this.uniqueId = error.uniqueId ? error.uniqueId : '';
|
|
74882
74885
|
this.token = token;
|
|
74883
74886
|
this.error = JSON.stringify((error.error ? error.error : error));
|
|
74887
|
+
this.environmentDetails = error.environmentDetails
|
|
74884
74888
|
};
|
|
74885
74889
|
|
|
74886
74890
|
this.updateToken = function (newToken) {
|
|
@@ -74917,7 +74921,22 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74917
74921
|
Sentry.setExtra('errorCode', err.code);
|
|
74918
74922
|
Sentry.setExtra('uniqueId', err.uniqueId);
|
|
74919
74923
|
Sentry.setExtra('token', err.token);
|
|
74924
|
+
Sentry.setExtra('SDKParams', {
|
|
74925
|
+
platformHost: params.platformHost,
|
|
74926
|
+
podSpaceFileServer: params.podSpaceFileServer,
|
|
74927
|
+
socketAddress: params.socketAddress,
|
|
74928
|
+
ssoHost: params.ssoHost,
|
|
74929
|
+
typeCode: params.typeCode,
|
|
74930
|
+
serverName: params.serverName,
|
|
74931
|
+
callRequestTimeout: params.callRequestTimeout,
|
|
74932
|
+
asyncRequestTimeout: params.asyncRequestTimeout,
|
|
74933
|
+
httpUploadRequestTimeout: params.httpUploadRequestTimeout,
|
|
74934
|
+
callOptions: params.callOptions
|
|
74935
|
+
});
|
|
74936
|
+
|
|
74920
74937
|
Sentry.setTag('Error code:', (err.code ? err.code : ''))
|
|
74938
|
+
if(err.environmentDetails)
|
|
74939
|
+
Sentry.setExtra("environmentDetails", err.environmentDetails)
|
|
74921
74940
|
Sentry.captureException(err.error, {
|
|
74922
74941
|
logger: eventName
|
|
74923
74942
|
});
|
package/package.json
CHANGED
package/src/call.module.js
CHANGED
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
var Utility = params.Utility,
|
|
18
18
|
currentModuleInstance = this,
|
|
19
|
-
Sentry = params.Sentry,
|
|
20
19
|
asyncClient = params.asyncClient,
|
|
21
20
|
chatEvents = params.chatEvents,
|
|
22
21
|
chatMessaging = params.chatMessaging,
|
|
23
22
|
token = params.token,
|
|
24
|
-
messagesCallbacks = {},
|
|
25
23
|
asyncRequestTimeouts = {},
|
|
26
24
|
chatMessageVOTypes = {
|
|
27
25
|
CREATE_THREAD: 1,
|
|
@@ -192,7 +190,7 @@
|
|
|
192
190
|
currentCallParams = {},
|
|
193
191
|
currentCallId = null,
|
|
194
192
|
newCallId = null,
|
|
195
|
-
shouldReconnectCallTimeout = null,
|
|
193
|
+
//shouldReconnectCallTimeout = null,
|
|
196
194
|
callMetaDataTypes = {
|
|
197
195
|
POORCONNECTION: 1,
|
|
198
196
|
POORCONNECTIONRESOLVED: 2,
|
|
@@ -221,7 +219,6 @@
|
|
|
221
219
|
callStopQueue = {
|
|
222
220
|
callStarted: false,
|
|
223
221
|
},
|
|
224
|
-
callServerName,
|
|
225
222
|
callServerController = new callServerManager(),
|
|
226
223
|
messageTtl = params.messageTtl || 10000,
|
|
227
224
|
config = {
|
|
@@ -473,7 +470,14 @@
|
|
|
473
470
|
options.sendSource = 'screen';
|
|
474
471
|
resolve(options);
|
|
475
472
|
}).catch(function (error) {
|
|
476
|
-
|
|
473
|
+
let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
|
|
474
|
+
console.error(errorString);
|
|
475
|
+
chatEvents.fireEvent('callEvents', {
|
|
476
|
+
type: 'CALL_ERROR',
|
|
477
|
+
code: 7000,
|
|
478
|
+
message: errorString,
|
|
479
|
+
environmentDetails: getSDKCallDetails()
|
|
480
|
+
});
|
|
477
481
|
explainUserMediaError(error, 'video', 'screen');
|
|
478
482
|
//resolve(options);
|
|
479
483
|
});
|
|
@@ -513,7 +517,14 @@
|
|
|
513
517
|
config.state = peerStates.CONNECTING;
|
|
514
518
|
config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
|
|
515
519
|
if (err) {
|
|
516
|
-
|
|
520
|
+
let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
|
|
521
|
+
console.error(errorString);
|
|
522
|
+
chatEvents.fireEvent('callEvents', {
|
|
523
|
+
type: 'CALL_ERROR',
|
|
524
|
+
code: 7000,
|
|
525
|
+
message: errorString,
|
|
526
|
+
environmentDetails: getSDKCallDetails()
|
|
527
|
+
});
|
|
517
528
|
return;
|
|
518
529
|
}
|
|
519
530
|
|
|
@@ -535,7 +546,14 @@
|
|
|
535
546
|
} else {
|
|
536
547
|
config.peer.generateOffer((err, sdpOffer) => {
|
|
537
548
|
if (err) {
|
|
538
|
-
|
|
549
|
+
let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
|
|
550
|
+
console.error(errorString);
|
|
551
|
+
chatEvents.fireEvent('callEvents', {
|
|
552
|
+
type: 'CALL_ERROR',
|
|
553
|
+
code: 7000,
|
|
554
|
+
message: errorString,
|
|
555
|
+
environmentDetails: getSDKCallDetails()
|
|
556
|
+
});
|
|
539
557
|
return;
|
|
540
558
|
}
|
|
541
559
|
manager.sendSDPOfferRequestMessage(sdpOffer, 1);
|
|
@@ -1487,7 +1505,8 @@
|
|
|
1487
1505
|
el.setAttribute('id', 'uiRemoteAudio-' + user.audioTopicName);
|
|
1488
1506
|
el.setAttribute('class', callAudioTagClassName);
|
|
1489
1507
|
el.setAttribute('autoplay', '');
|
|
1490
|
-
|
|
1508
|
+
if(user.direction === 'send')
|
|
1509
|
+
el.setAttribute('muted', '');
|
|
1491
1510
|
el.setAttribute('controls', '');
|
|
1492
1511
|
}
|
|
1493
1512
|
|
|
@@ -1748,12 +1767,12 @@
|
|
|
1748
1767
|
},
|
|
1749
1768
|
|
|
1750
1769
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
1751
|
-
chatEvents.fireEvent('callEvents', {
|
|
1770
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
1752
1771
|
type: 'CALL_ERROR',
|
|
1753
1772
|
code: 7000,
|
|
1754
1773
|
message: err,
|
|
1755
1774
|
environmentDetails: getSDKCallDetails()
|
|
1756
|
-
})
|
|
1775
|
+
});*/
|
|
1757
1776
|
|
|
1758
1777
|
const n = err.name;
|
|
1759
1778
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
|
@@ -4007,8 +4026,8 @@
|
|
|
4007
4026
|
|
|
4008
4027
|
//TODO: should be moved to event 113 when server fixes
|
|
4009
4028
|
|
|
4010
|
-
currentModuleInstance.pauseMice({});
|
|
4011
|
-
callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
4029
|
+
// currentModuleInstance.pauseMice({});
|
|
4030
|
+
// callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
4012
4031
|
|
|
4013
4032
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
4014
4033
|
onResult: function (result) {
|
|
@@ -4051,10 +4070,10 @@
|
|
|
4051
4070
|
}
|
|
4052
4071
|
|
|
4053
4072
|
//TODO: Should be moved to event from chat server (when chat server fixes the bug)
|
|
4054
|
-
var myId = chatMessaging.userInfo.id
|
|
4055
|
-
|
|
4073
|
+
//var myId = chatMessaging.userInfo.id
|
|
4074
|
+
//, myUser = callUsers[myId];
|
|
4056
4075
|
|
|
4057
|
-
if(myUser.audioStopManager.isStreamPaused()) {
|
|
4076
|
+
/* if(myUser.audioStopManager.isStreamPaused()) {
|
|
4058
4077
|
if (myUser.audioStopManager.isStreamStopped()){
|
|
4059
4078
|
callStateController.activateParticipantStream(
|
|
4060
4079
|
myId,
|
|
@@ -4068,7 +4087,7 @@
|
|
|
4068
4087
|
currentModuleInstance.resumeMice({});
|
|
4069
4088
|
}
|
|
4070
4089
|
myUser.audioStopManager.reset();
|
|
4071
|
-
}
|
|
4090
|
+
}*/
|
|
4072
4091
|
|
|
4073
4092
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
4074
4093
|
onResult: function (result) {
|
package/src/chat.js
CHANGED
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
var asyncClient,
|
|
54
54
|
peerId,
|
|
55
55
|
oldPeerId,
|
|
56
|
-
userInfo,
|
|
57
56
|
token = params.token,
|
|
58
57
|
generalTypeCode = params.typeCode || 'default',
|
|
59
58
|
mapApiKey = params.mapApiKey || '8b77db18704aa646ee5aaea13e7370f4f88b9e8c',
|
|
@@ -74,17 +73,13 @@
|
|
|
74
73
|
grantDeviceIdFromSSO = (params.grantDeviceIdFromSSO && typeof params.grantDeviceIdFromSSO === 'boolean')
|
|
75
74
|
? params.grantDeviceIdFromSSO
|
|
76
75
|
: false,
|
|
77
|
-
messagesCallbacks = {},
|
|
78
76
|
messagesDelivery = {},
|
|
79
77
|
messagesSeen = {},
|
|
80
78
|
deliveryInterval,
|
|
81
79
|
deliveryIntervalPitch = params.deliveryIntervalPitch || 2000,
|
|
82
80
|
seenInterval,
|
|
83
81
|
seenIntervalPitch = params.seenIntervalPitch || 2000,
|
|
84
|
-
sendMessageCallbacks = {},
|
|
85
|
-
threadCallbacks = {},
|
|
86
82
|
getImageFromLinkObjects = {},
|
|
87
|
-
asyncRequestTimeouts = {},
|
|
88
83
|
chatMessageVOTypes = {
|
|
89
84
|
CREATE_THREAD: 1,
|
|
90
85
|
MESSAGE: 2,
|
|
@@ -260,10 +255,6 @@
|
|
|
260
255
|
'THREAD': 2,
|
|
261
256
|
'CONTACTS': 3
|
|
262
257
|
},
|
|
263
|
-
currentCallId = null,
|
|
264
|
-
callTopics = {},
|
|
265
|
-
webpeers = {},
|
|
266
|
-
webpeersMetadata = {},
|
|
267
258
|
callRequestController = {
|
|
268
259
|
callRequestReceived: false,
|
|
269
260
|
callEstablishedInMySide: false,
|
|
@@ -274,10 +265,6 @@
|
|
|
274
265
|
return false;
|
|
275
266
|
}
|
|
276
267
|
},
|
|
277
|
-
uiRemoteMedias = {},
|
|
278
|
-
callStopQueue = {
|
|
279
|
-
callStarted: false,
|
|
280
|
-
},
|
|
281
268
|
systemMessageIntervalPitch = params.systemMessageIntervalPitch || 1000,
|
|
282
269
|
isTypingInterval,
|
|
283
270
|
protocol = params.protocol || 'websocket',
|
|
@@ -290,7 +277,6 @@
|
|
|
290
277
|
queueConnectionTimeout = params.queueConnectionTimeout,
|
|
291
278
|
socketAddress = params.socketAddress,
|
|
292
279
|
serverName = params.serverName || '',
|
|
293
|
-
callServerName,
|
|
294
280
|
wsConnectionWaitTime = params.wsConnectionWaitTime,
|
|
295
281
|
connectionRetryInterval = params.connectionRetryInterval,
|
|
296
282
|
msgPriority = params.msgPriority || 1,
|
|
@@ -298,7 +284,6 @@
|
|
|
298
284
|
reconnectOnClose = params.reconnectOnClose,
|
|
299
285
|
asyncLogging = params.asyncLogging,
|
|
300
286
|
chatPingMessageInterval = 20000,
|
|
301
|
-
sendPingTimeout,
|
|
302
287
|
getUserInfoTimeout,
|
|
303
288
|
config = {
|
|
304
289
|
getHistoryCount: 50
|
|
@@ -391,14 +376,13 @@
|
|
|
391
376
|
},
|
|
392
377
|
getUserInfoRetry = 5,
|
|
393
378
|
getUserInfoRetryCount = 0,
|
|
394
|
-
chatState = false,
|
|
395
379
|
chatFullStateObject = {},
|
|
396
380
|
httpRequestObject = {},
|
|
397
381
|
connectionCheckTimeout = params.connectionCheckTimeout,
|
|
398
382
|
connectionCheckTimeoutThreshold = params.connectionCheckTimeoutThreshold,
|
|
399
383
|
httpRequestTimeout = (params.httpRequestTimeout >= 0) ? params.httpRequestTimeout : 0,
|
|
400
384
|
asyncRequestTimeout = (typeof params.asyncRequestTimeout === 'number' && params.asyncRequestTimeout >= 0) ? params.asyncRequestTimeout : 0,
|
|
401
|
-
callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
385
|
+
//callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
402
386
|
httpUploadRequestTimeout = (params.httpUploadRequestTimeout >= 0) ? params.httpUploadRequestTimeout : 0,
|
|
403
387
|
actualTimingLog = (params.asyncLogging.actualTiming && typeof params.asyncLogging.actualTiming === 'boolean')
|
|
404
388
|
? params.asyncLogging.actualTiming
|
package/src/events.module.js
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
this.uniqueId = error.uniqueId ? error.uniqueId : '';
|
|
37
37
|
this.token = token;
|
|
38
38
|
this.error = JSON.stringify((error.error ? error.error : error));
|
|
39
|
+
this.environmentDetails = error.environmentDetails
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
this.updateToken = function (newToken) {
|
|
@@ -72,7 +73,22 @@
|
|
|
72
73
|
Sentry.setExtra('errorCode', err.code);
|
|
73
74
|
Sentry.setExtra('uniqueId', err.uniqueId);
|
|
74
75
|
Sentry.setExtra('token', err.token);
|
|
76
|
+
Sentry.setExtra('SDKParams', {
|
|
77
|
+
platformHost: params.platformHost,
|
|
78
|
+
podSpaceFileServer: params.podSpaceFileServer,
|
|
79
|
+
socketAddress: params.socketAddress,
|
|
80
|
+
ssoHost: params.ssoHost,
|
|
81
|
+
typeCode: params.typeCode,
|
|
82
|
+
serverName: params.serverName,
|
|
83
|
+
callRequestTimeout: params.callRequestTimeout,
|
|
84
|
+
asyncRequestTimeout: params.asyncRequestTimeout,
|
|
85
|
+
httpUploadRequestTimeout: params.httpUploadRequestTimeout,
|
|
86
|
+
callOptions: params.callOptions
|
|
87
|
+
});
|
|
88
|
+
|
|
75
89
|
Sentry.setTag('Error code:', (err.code ? err.code : ''))
|
|
90
|
+
if(err.environmentDetails)
|
|
91
|
+
Sentry.setExtra("environmentDetails", err.environmentDetails)
|
|
76
92
|
Sentry.captureException(err.error, {
|
|
77
93
|
logger: eventName
|
|
78
94
|
});
|