podchat-browser 12.5.2-snapshot.4 → 12.5.2-snapshot.7

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 CHANGED
@@ -3,6 +3,18 @@
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.7] - 2022-06-1
7
+ ### Changed
8
+ - Removed CALL_ENDED from LEAVE_CALL event in GroupCall
9
+
10
+ ## [12.5.2-snapshot.6] - 2022-05-31
11
+ ### Fixed
12
+ - Mute audio send only not all audio tags (Causes problems in Apple devices)
13
+
14
+ ## [12.5.2-snapshot.5] - 2022-05-29
15
+ ### Fixed
16
+ - User being muted when muting others
17
+
6
18
  ## [12.5.2-snapshot.4] - 2022-05-29
7
19
  ### Changed
8
20
  - Improved call error logs in Sentry
@@ -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 = {
@@ -57753,7 +57750,8 @@ WildEmitter.mixin(WildEmitter);
57753
57750
  el.setAttribute('id', 'uiRemoteAudio-' + user.audioTopicName);
57754
57751
  el.setAttribute('class', callAudioTagClassName);
57755
57752
  el.setAttribute('autoplay', '');
57756
- el.setAttribute('muted', '');
57753
+ if(user.direction === 'send')
57754
+ el.setAttribute('muted', '');
57757
57755
  el.setAttribute('controls', '');
57758
57756
  }
57759
57757
 
@@ -58920,12 +58918,12 @@ WildEmitter.mixin(WildEmitter);
58920
58918
  if(screenShareInfo.isStarted() && screenShareInfo.getOwner() === messageContent[0].userId)
58921
58919
  callStateController.removeScreenShareFromCall()
58922
58920
 
58923
- if(messageContent[0].userId === chatMessaging.userInfo.id) {
58921
+ /* if(messageContent[0].userId === chatMessaging.userInfo.id) {
58924
58922
  chatEvents.fireEvent('callEvents', {
58925
58923
  type: 'CALL_ENDED',
58926
58924
  callId: threadId
58927
58925
  });
58928
- }
58926
+ }*/
58929
58927
  }
58930
58928
 
58931
58929
  //If I'm the only call participant, stop the call
@@ -60273,8 +60271,8 @@ WildEmitter.mixin(WildEmitter);
60273
60271
 
60274
60272
  //TODO: should be moved to event 113 when server fixes
60275
60273
 
60276
- currentModuleInstance.pauseMice({});
60277
- callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
60274
+ // currentModuleInstance.pauseMice({});
60275
+ // callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
60278
60276
 
60279
60277
  return chatMessaging.sendMessage(sendMessageParams, {
60280
60278
  onResult: function (result) {
@@ -60317,10 +60315,10 @@ WildEmitter.mixin(WildEmitter);
60317
60315
  }
60318
60316
 
60319
60317
  //TODO: Should be moved to event from chat server (when chat server fixes the bug)
60320
- var myId = chatMessaging.userInfo.id
60321
- , myUser = callUsers[myId];
60318
+ //var myId = chatMessaging.userInfo.id
60319
+ //, myUser = callUsers[myId];
60322
60320
 
60323
- if(myUser.audioStopManager.isStreamPaused()) {
60321
+ /* if(myUser.audioStopManager.isStreamPaused()) {
60324
60322
  if (myUser.audioStopManager.isStreamStopped()){
60325
60323
  callStateController.activateParticipantStream(
60326
60324
  myId,
@@ -60334,7 +60332,7 @@ WildEmitter.mixin(WildEmitter);
60334
60332
  currentModuleInstance.resumeMice({});
60335
60333
  }
60336
60334
  myUser.audioStopManager.reset();
60337
- }
60335
+ }*/
60338
60336
 
60339
60337
  return chatMessaging.sendMessage(sendMessageParams, {
60340
60338
  onResult: function (result) {
@@ -60664,7 +60662,6 @@ WildEmitter.mixin(WildEmitter);
60664
60662
  var asyncClient,
60665
60663
  peerId,
60666
60664
  oldPeerId,
60667
- userInfo,
60668
60665
  token = params.token,
60669
60666
  generalTypeCode = params.typeCode || 'default',
60670
60667
  mapApiKey = params.mapApiKey || '8b77db18704aa646ee5aaea13e7370f4f88b9e8c',
@@ -60685,17 +60682,13 @@ WildEmitter.mixin(WildEmitter);
60685
60682
  grantDeviceIdFromSSO = (params.grantDeviceIdFromSSO && typeof params.grantDeviceIdFromSSO === 'boolean')
60686
60683
  ? params.grantDeviceIdFromSSO
60687
60684
  : false,
60688
- messagesCallbacks = {},
60689
60685
  messagesDelivery = {},
60690
60686
  messagesSeen = {},
60691
60687
  deliveryInterval,
60692
60688
  deliveryIntervalPitch = params.deliveryIntervalPitch || 2000,
60693
60689
  seenInterval,
60694
60690
  seenIntervalPitch = params.seenIntervalPitch || 2000,
60695
- sendMessageCallbacks = {},
60696
- threadCallbacks = {},
60697
60691
  getImageFromLinkObjects = {},
60698
- asyncRequestTimeouts = {},
60699
60692
  chatMessageVOTypes = {
60700
60693
  CREATE_THREAD: 1,
60701
60694
  MESSAGE: 2,
@@ -60871,10 +60864,6 @@ WildEmitter.mixin(WildEmitter);
60871
60864
  'THREAD': 2,
60872
60865
  'CONTACTS': 3
60873
60866
  },
60874
- currentCallId = null,
60875
- callTopics = {},
60876
- webpeers = {},
60877
- webpeersMetadata = {},
60878
60867
  callRequestController = {
60879
60868
  callRequestReceived: false,
60880
60869
  callEstablishedInMySide: false,
@@ -60885,10 +60874,6 @@ WildEmitter.mixin(WildEmitter);
60885
60874
  return false;
60886
60875
  }
60887
60876
  },
60888
- uiRemoteMedias = {},
60889
- callStopQueue = {
60890
- callStarted: false,
60891
- },
60892
60877
  systemMessageIntervalPitch = params.systemMessageIntervalPitch || 1000,
60893
60878
  isTypingInterval,
60894
60879
  protocol = params.protocol || 'websocket',
@@ -60901,7 +60886,6 @@ WildEmitter.mixin(WildEmitter);
60901
60886
  queueConnectionTimeout = params.queueConnectionTimeout,
60902
60887
  socketAddress = params.socketAddress,
60903
60888
  serverName = params.serverName || '',
60904
- callServerName,
60905
60889
  wsConnectionWaitTime = params.wsConnectionWaitTime,
60906
60890
  connectionRetryInterval = params.connectionRetryInterval,
60907
60891
  msgPriority = params.msgPriority || 1,
@@ -60909,7 +60893,6 @@ WildEmitter.mixin(WildEmitter);
60909
60893
  reconnectOnClose = params.reconnectOnClose,
60910
60894
  asyncLogging = params.asyncLogging,
60911
60895
  chatPingMessageInterval = 20000,
60912
- sendPingTimeout,
60913
60896
  getUserInfoTimeout,
60914
60897
  config = {
60915
60898
  getHistoryCount: 50
@@ -61002,14 +60985,13 @@ WildEmitter.mixin(WildEmitter);
61002
60985
  },
61003
60986
  getUserInfoRetry = 5,
61004
60987
  getUserInfoRetryCount = 0,
61005
- chatState = false,
61006
60988
  chatFullStateObject = {},
61007
60989
  httpRequestObject = {},
61008
60990
  connectionCheckTimeout = params.connectionCheckTimeout,
61009
60991
  connectionCheckTimeoutThreshold = params.connectionCheckTimeoutThreshold,
61010
60992
  httpRequestTimeout = (params.httpRequestTimeout >= 0) ? params.httpRequestTimeout : 0,
61011
60993
  asyncRequestTimeout = (typeof params.asyncRequestTimeout === 'number' && params.asyncRequestTimeout >= 0) ? params.asyncRequestTimeout : 0,
61012
- callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
60994
+ //callRequestTimeout = (typeof params.callRequestTimeout === 'number' && params.callRequestTimeout >= 0) ? params.callRequestTimeout : 10000,
61013
60995
  httpUploadRequestTimeout = (params.httpUploadRequestTimeout >= 0) ? params.httpUploadRequestTimeout : 0,
61014
60996
  actualTimingLog = (params.asyncLogging.actualTiming && typeof params.asyncLogging.actualTiming === 'boolean')
61015
60997
  ? params.asyncLogging.actualTiming
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podchat-browser",
3
- "version": "12.5.2-snapshot.4",
3
+ "version": "12.5.2-snapshot.7",
4
4
  "description": "Javascript SDK to use POD's Chat Service - Browser Only",
5
5
  "main": "./src/chat.js",
6
6
  "scripts": {
@@ -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 = {
@@ -1508,7 +1505,8 @@
1508
1505
  el.setAttribute('id', 'uiRemoteAudio-' + user.audioTopicName);
1509
1506
  el.setAttribute('class', callAudioTagClassName);
1510
1507
  el.setAttribute('autoplay', '');
1511
- el.setAttribute('muted', '');
1508
+ if(user.direction === 'send')
1509
+ el.setAttribute('muted', '');
1512
1510
  el.setAttribute('controls', '');
1513
1511
  }
1514
1512
 
@@ -2675,12 +2673,12 @@
2675
2673
  if(screenShareInfo.isStarted() && screenShareInfo.getOwner() === messageContent[0].userId)
2676
2674
  callStateController.removeScreenShareFromCall()
2677
2675
 
2678
- if(messageContent[0].userId === chatMessaging.userInfo.id) {
2676
+ /* if(messageContent[0].userId === chatMessaging.userInfo.id) {
2679
2677
  chatEvents.fireEvent('callEvents', {
2680
2678
  type: 'CALL_ENDED',
2681
2679
  callId: threadId
2682
2680
  });
2683
- }
2681
+ }*/
2684
2682
  }
2685
2683
 
2686
2684
  //If I'm the only call participant, stop the call
@@ -4028,8 +4026,8 @@
4028
4026
 
4029
4027
  //TODO: should be moved to event 113 when server fixes
4030
4028
 
4031
- currentModuleInstance.pauseMice({});
4032
- callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
4029
+ // currentModuleInstance.pauseMice({});
4030
+ // callUsers[chatMessaging.userInfo.id].audioStopManager.disableStream();
4033
4031
 
4034
4032
  return chatMessaging.sendMessage(sendMessageParams, {
4035
4033
  onResult: function (result) {
@@ -4072,10 +4070,10 @@
4072
4070
  }
4073
4071
 
4074
4072
  //TODO: Should be moved to event from chat server (when chat server fixes the bug)
4075
- var myId = chatMessaging.userInfo.id
4076
- , myUser = callUsers[myId];
4073
+ //var myId = chatMessaging.userInfo.id
4074
+ //, myUser = callUsers[myId];
4077
4075
 
4078
- if(myUser.audioStopManager.isStreamPaused()) {
4076
+ /* if(myUser.audioStopManager.isStreamPaused()) {
4079
4077
  if (myUser.audioStopManager.isStreamStopped()){
4080
4078
  callStateController.activateParticipantStream(
4081
4079
  myId,
@@ -4089,7 +4087,7 @@
4089
4087
  currentModuleInstance.resumeMice({});
4090
4088
  }
4091
4089
  myUser.audioStopManager.reset();
4092
- }
4090
+ }*/
4093
4091
 
4094
4092
  return chatMessaging.sendMessage(sendMessageParams, {
4095
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