podchat-browser 12.5.2-snapshot.2 → 12.5.2-snapshot.5
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 +14 -1
- package/examples/bundle-test.js +53 -34
- package/package.json +1 -1
- package/src/call.module.js +33 -15
- package/src/chat.js +2 -18
- package/src/events.module.js +16 -0
package/changelog.md
CHANGED
|
@@ -3,7 +3,20 @@
|
|
|
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.
|
|
6
|
+
## [12.5.2-snapshot.5] - 2022-05-29
|
|
7
|
+
### Changed
|
|
8
|
+
- Fixes 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
|
+
|
|
19
|
+
## [12.5.2-snapshot.2] - 2022-05-24
|
|
7
20
|
### Changed
|
|
8
21
|
- Update async package
|
|
9
22
|
|
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);
|
|
@@ -57993,12 +58011,12 @@ WildEmitter.mixin(WildEmitter);
|
|
|
57993
58011
|
},
|
|
57994
58012
|
|
|
57995
58013
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
57996
|
-
chatEvents.fireEvent('callEvents', {
|
|
58014
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
57997
58015
|
type: 'CALL_ERROR',
|
|
57998
58016
|
code: 7000,
|
|
57999
58017
|
message: err,
|
|
58000
58018
|
environmentDetails: getSDKCallDetails()
|
|
58001
|
-
})
|
|
58019
|
+
});*/
|
|
58002
58020
|
|
|
58003
58021
|
const n = err.name;
|
|
58004
58022
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
|
@@ -60252,8 +60270,8 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60252
60270
|
|
|
60253
60271
|
//TODO: should be moved to event 113 when server fixes
|
|
60254
60272
|
|
|
60255
|
-
currentModuleInstance.pauseMice({});
|
|
60256
|
-
callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
60273
|
+
// currentModuleInstance.pauseMice({});
|
|
60274
|
+
// callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
60257
60275
|
|
|
60258
60276
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
60259
60277
|
onResult: function (result) {
|
|
@@ -60296,10 +60314,10 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60296
60314
|
}
|
|
60297
60315
|
|
|
60298
60316
|
//TODO: Should be moved to event from chat server (when chat server fixes the bug)
|
|
60299
|
-
var myId = chatMessaging.userInfo.id
|
|
60300
|
-
|
|
60317
|
+
//var myId = chatMessaging.userInfo.id
|
|
60318
|
+
//, myUser = callUsers[myId];
|
|
60301
60319
|
|
|
60302
|
-
if(myUser.audioStopManager.isStreamPaused()) {
|
|
60320
|
+
/* if(myUser.audioStopManager.isStreamPaused()) {
|
|
60303
60321
|
if (myUser.audioStopManager.isStreamStopped()){
|
|
60304
60322
|
callStateController.activateParticipantStream(
|
|
60305
60323
|
myId,
|
|
@@ -60313,7 +60331,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60313
60331
|
currentModuleInstance.resumeMice({});
|
|
60314
60332
|
}
|
|
60315
60333
|
myUser.audioStopManager.reset();
|
|
60316
|
-
}
|
|
60334
|
+
}*/
|
|
60317
60335
|
|
|
60318
60336
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
60319
60337
|
onResult: function (result) {
|
|
@@ -60632,7 +60650,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60632
60650
|
|
|
60633
60651
|
if (!!Sentry) {
|
|
60634
60652
|
Sentry.init({
|
|
60635
|
-
dsn: '
|
|
60653
|
+
dsn: 'https://784a14966f6a416b8b58a4b144aef0f5:733b76b6354f4547a7428bb8c7489bf2@talksentry.sakku-khatam.ir/4',
|
|
60636
60654
|
attachStacktrace: true
|
|
60637
60655
|
});
|
|
60638
60656
|
Sentry.setContext("Chat Params", params);
|
|
@@ -60643,7 +60661,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60643
60661
|
var asyncClient,
|
|
60644
60662
|
peerId,
|
|
60645
60663
|
oldPeerId,
|
|
60646
|
-
userInfo,
|
|
60647
60664
|
token = params.token,
|
|
60648
60665
|
generalTypeCode = params.typeCode || 'default',
|
|
60649
60666
|
mapApiKey = params.mapApiKey || '8b77db18704aa646ee5aaea13e7370f4f88b9e8c',
|
|
@@ -60664,17 +60681,13 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60664
60681
|
grantDeviceIdFromSSO = (params.grantDeviceIdFromSSO && typeof params.grantDeviceIdFromSSO === 'boolean')
|
|
60665
60682
|
? params.grantDeviceIdFromSSO
|
|
60666
60683
|
: false,
|
|
60667
|
-
messagesCallbacks = {},
|
|
60668
60684
|
messagesDelivery = {},
|
|
60669
60685
|
messagesSeen = {},
|
|
60670
60686
|
deliveryInterval,
|
|
60671
60687
|
deliveryIntervalPitch = params.deliveryIntervalPitch || 2000,
|
|
60672
60688
|
seenInterval,
|
|
60673
60689
|
seenIntervalPitch = params.seenIntervalPitch || 2000,
|
|
60674
|
-
sendMessageCallbacks = {},
|
|
60675
|
-
threadCallbacks = {},
|
|
60676
60690
|
getImageFromLinkObjects = {},
|
|
60677
|
-
asyncRequestTimeouts = {},
|
|
60678
60691
|
chatMessageVOTypes = {
|
|
60679
60692
|
CREATE_THREAD: 1,
|
|
60680
60693
|
MESSAGE: 2,
|
|
@@ -60850,10 +60863,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60850
60863
|
'THREAD': 2,
|
|
60851
60864
|
'CONTACTS': 3
|
|
60852
60865
|
},
|
|
60853
|
-
currentCallId = null,
|
|
60854
|
-
callTopics = {},
|
|
60855
|
-
webpeers = {},
|
|
60856
|
-
webpeersMetadata = {},
|
|
60857
60866
|
callRequestController = {
|
|
60858
60867
|
callRequestReceived: false,
|
|
60859
60868
|
callEstablishedInMySide: false,
|
|
@@ -60864,10 +60873,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60864
60873
|
return false;
|
|
60865
60874
|
}
|
|
60866
60875
|
},
|
|
60867
|
-
uiRemoteMedias = {},
|
|
60868
|
-
callStopQueue = {
|
|
60869
|
-
callStarted: false,
|
|
60870
|
-
},
|
|
60871
60876
|
systemMessageIntervalPitch = params.systemMessageIntervalPitch || 1000,
|
|
60872
60877
|
isTypingInterval,
|
|
60873
60878
|
protocol = params.protocol || 'websocket',
|
|
@@ -60880,7 +60885,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60880
60885
|
queueConnectionTimeout = params.queueConnectionTimeout,
|
|
60881
60886
|
socketAddress = params.socketAddress,
|
|
60882
60887
|
serverName = params.serverName || '',
|
|
60883
|
-
callServerName,
|
|
60884
60888
|
wsConnectionWaitTime = params.wsConnectionWaitTime,
|
|
60885
60889
|
connectionRetryInterval = params.connectionRetryInterval,
|
|
60886
60890
|
msgPriority = params.msgPriority || 1,
|
|
@@ -60888,7 +60892,6 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60888
60892
|
reconnectOnClose = params.reconnectOnClose,
|
|
60889
60893
|
asyncLogging = params.asyncLogging,
|
|
60890
60894
|
chatPingMessageInterval = 20000,
|
|
60891
|
-
sendPingTimeout,
|
|
60892
60895
|
getUserInfoTimeout,
|
|
60893
60896
|
config = {
|
|
60894
60897
|
getHistoryCount: 50
|
|
@@ -60981,14 +60984,13 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60981
60984
|
},
|
|
60982
60985
|
getUserInfoRetry = 5,
|
|
60983
60986
|
getUserInfoRetryCount = 0,
|
|
60984
|
-
chatState = false,
|
|
60985
60987
|
chatFullStateObject = {},
|
|
60986
60988
|
httpRequestObject = {},
|
|
60987
60989
|
connectionCheckTimeout = params.connectionCheckTimeout,
|
|
60988
60990
|
connectionCheckTimeoutThreshold = params.connectionCheckTimeoutThreshold,
|
|
60989
60991
|
httpRequestTimeout = (params.httpRequestTimeout >= 0) ? params.httpRequestTimeout : 0,
|
|
60990
60992
|
asyncRequestTimeout = (typeof params.asyncRequestTimeout === 'number' && params.asyncRequestTimeout >= 0) ? params.asyncRequestTimeout : 0,
|
|
60991
|
-
callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
60993
|
+
//callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
|
|
60992
60994
|
httpUploadRequestTimeout = (params.httpUploadRequestTimeout >= 0) ? params.httpUploadRequestTimeout : 0,
|
|
60993
60995
|
actualTimingLog = (params.asyncLogging.actualTiming && typeof params.asyncLogging.actualTiming === 'boolean')
|
|
60994
60996
|
? params.asyncLogging.actualTiming
|
|
@@ -61098,7 +61100,8 @@ WildEmitter.mixin(WildEmitter);
|
|
|
61098
61100
|
connectionCheckTimeoutThreshold: connectionCheckTimeoutThreshold,
|
|
61099
61101
|
messageTtl: messageTtl,
|
|
61100
61102
|
reconnectOnClose: reconnectOnClose,
|
|
61101
|
-
asyncLogging: asyncLogging
|
|
61103
|
+
asyncLogging: asyncLogging,
|
|
61104
|
+
logLevel: (consoleLogging ? 3 : 1)
|
|
61102
61105
|
});
|
|
61103
61106
|
callModule.asyncInitialized(asyncClient);
|
|
61104
61107
|
chatMessaging.asyncInitialized(asyncClient);
|
|
@@ -74880,6 +74883,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74880
74883
|
this.uniqueId = error.uniqueId ? error.uniqueId : '';
|
|
74881
74884
|
this.token = token;
|
|
74882
74885
|
this.error = JSON.stringify((error.error ? error.error : error));
|
|
74886
|
+
this.environmentDetails = error.environmentDetails
|
|
74883
74887
|
};
|
|
74884
74888
|
|
|
74885
74889
|
this.updateToken = function (newToken) {
|
|
@@ -74916,7 +74920,22 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74916
74920
|
Sentry.setExtra('errorCode', err.code);
|
|
74917
74921
|
Sentry.setExtra('uniqueId', err.uniqueId);
|
|
74918
74922
|
Sentry.setExtra('token', err.token);
|
|
74923
|
+
Sentry.setExtra('SDKParams', {
|
|
74924
|
+
platformHost: params.platformHost,
|
|
74925
|
+
podSpaceFileServer: params.podSpaceFileServer,
|
|
74926
|
+
socketAddress: params.socketAddress,
|
|
74927
|
+
ssoHost: params.ssoHost,
|
|
74928
|
+
typeCode: params.typeCode,
|
|
74929
|
+
serverName: params.serverName,
|
|
74930
|
+
callRequestTimeout: params.callRequestTimeout,
|
|
74931
|
+
asyncRequestTimeout: params.asyncRequestTimeout,
|
|
74932
|
+
httpUploadRequestTimeout: params.httpUploadRequestTimeout,
|
|
74933
|
+
callOptions: params.callOptions
|
|
74934
|
+
});
|
|
74935
|
+
|
|
74919
74936
|
Sentry.setTag('Error code:', (err.code ? err.code : ''))
|
|
74937
|
+
if(err.environmentDetails)
|
|
74938
|
+
Sentry.setExtra("environmentDetails", err.environmentDetails)
|
|
74920
74939
|
Sentry.captureException(err.error, {
|
|
74921
74940
|
logger: eventName
|
|
74922
74941
|
});
|
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);
|
|
@@ -1748,12 +1766,12 @@
|
|
|
1748
1766
|
},
|
|
1749
1767
|
|
|
1750
1768
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
1751
|
-
chatEvents.fireEvent('callEvents', {
|
|
1769
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
1752
1770
|
type: 'CALL_ERROR',
|
|
1753
1771
|
code: 7000,
|
|
1754
1772
|
message: err,
|
|
1755
1773
|
environmentDetails: getSDKCallDetails()
|
|
1756
|
-
})
|
|
1774
|
+
});*/
|
|
1757
1775
|
|
|
1758
1776
|
const n = err.name;
|
|
1759
1777
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
|
@@ -4007,8 +4025,8 @@
|
|
|
4007
4025
|
|
|
4008
4026
|
//TODO: should be moved to event 113 when server fixes
|
|
4009
4027
|
|
|
4010
|
-
currentModuleInstance.pauseMice({});
|
|
4011
|
-
callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
4028
|
+
// currentModuleInstance.pauseMice({});
|
|
4029
|
+
// callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
|
|
4012
4030
|
|
|
4013
4031
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
4014
4032
|
onResult: function (result) {
|
|
@@ -4051,10 +4069,10 @@
|
|
|
4051
4069
|
}
|
|
4052
4070
|
|
|
4053
4071
|
//TODO: Should be moved to event from chat server (when chat server fixes the bug)
|
|
4054
|
-
var myId = chatMessaging.userInfo.id
|
|
4055
|
-
|
|
4072
|
+
//var myId = chatMessaging.userInfo.id
|
|
4073
|
+
//, myUser = callUsers[myId];
|
|
4056
4074
|
|
|
4057
|
-
if(myUser.audioStopManager.isStreamPaused()) {
|
|
4075
|
+
/* if(myUser.audioStopManager.isStreamPaused()) {
|
|
4058
4076
|
if (myUser.audioStopManager.isStreamStopped()){
|
|
4059
4077
|
callStateController.activateParticipantStream(
|
|
4060
4078
|
myId,
|
|
@@ -4068,7 +4086,7 @@
|
|
|
4068
4086
|
currentModuleInstance.resumeMice({});
|
|
4069
4087
|
}
|
|
4070
4088
|
myUser.audioStopManager.reset();
|
|
4071
|
-
}
|
|
4089
|
+
}*/
|
|
4072
4090
|
|
|
4073
4091
|
return chatMessaging.sendMessage(sendMessageParams, {
|
|
4074
4092
|
onResult: function (result) {
|
package/src/chat.js
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
if (!!Sentry) {
|
|
44
44
|
Sentry.init({
|
|
45
|
-
dsn: '
|
|
45
|
+
dsn: 'https://784a14966f6a416b8b58a4b144aef0f5:733b76b6354f4547a7428bb8c7489bf2@talksentry.sakku-khatam.ir/4',
|
|
46
46
|
attachStacktrace: true
|
|
47
47
|
});
|
|
48
48
|
Sentry.setContext("Chat Params", params);
|
|
@@ -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
|
});
|