podchat-browser 12.1.0 → 12.1.1-snapshot.0

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,20 @@
3
3
  All notable changes to this project will be documented here.
4
4
  to see complete list of changelog please visit [ChangeLog](https://github.com/masoudmanson/pod-chat/blob/master/changelog.md)
5
5
 
6
+ ## [12.1.0] - 2021-12-25
7
+ ### Added
8
+ - Browsers default "stop sharing" button event handler
9
+ - Sample to admin a user in a thread
10
+
11
+ ### Fixed
12
+ - rejectCall in p2p calls
13
+ - exportChat result headers not readable
14
+
15
+ ## [11.4.3] - 2021-12-13
16
+ ### Added
17
+ - Poor Connection metadata
18
+
19
+
6
20
  ## [11.4.2] - 2021-12-13
7
21
  ### Added
8
22
  - Call metadata
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podchat-browser",
3
- "version": "12.1.0",
3
+ "version": "12.1.1-snapshot.0",
4
4
  "description": "Javascript SDK to use POD's Chat Service - Browser Only",
5
5
  "main": "./src/chat.js",
6
6
  "scripts": {
@@ -15,7 +15,6 @@
15
15
  }
16
16
 
17
17
 
18
-
19
18
  var Utility = params.Utility,
20
19
  currentModuleInstance = this,
21
20
  Sentry = params.Sentry,
@@ -156,6 +155,18 @@
156
155
  'VIDEO': 0x1
157
156
  },
158
157
  callOptions = params.callOptions,
158
+ isPrivateIP = function (ip) {
159
+ var r = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/;
160
+
161
+ if(!ip.match(r))
162
+ return false;
163
+
164
+ var parts = ip.split('.');
165
+ return parts[0] === '10' ||
166
+ (parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
167
+ (parts[0] === '192' && parts[1] === '168');
168
+ },
169
+ useInternalTurnAddress = isPrivateIP(params.socketAddress), // !!(params.callOptions && params.callOptions.useInternalTurnAddress),
159
170
  callTurnIp = (params.callOptions
160
171
  && params.callOptions.hasOwnProperty('callTurnIp')
161
172
  && typeof params.callOptions.callTurnIp === 'string')
@@ -853,8 +864,11 @@
853
864
  });
854
865
  },
855
866
  getTurnServer: function (params) {
856
- if (!!params.turnAddress && params.turnAddress.length > 0) {
857
- var serversTemp = params.turnAddress.split(',');
867
+ console.log({useInternalTurnAddress})
868
+ if (!!params.turnAddress && params.turnAddress.length > 0
869
+ || (useInternalTurnAddress && !!params.internalTurnAddress && params.turnAddress.length > 0 )) {
870
+
871
+ var serversTemp = useInternalTurnAddress ? params.internalTurnAddress.split(',') : params.turnAddress.split(',');
858
872
 
859
873
  return [
860
874
  {
@@ -1923,6 +1937,7 @@
1923
1937
  screenShare: messageContent.chatDataDto.screenShare,
1924
1938
  brokerAddress: messageContent.chatDataDto.brokerAddressWeb,
1925
1939
  turnAddress: messageContent.chatDataDto.turnAddress,
1940
+ internalTurnAddress: messageContent.chatDataDto.internalTurnAddress,
1926
1941
  selfData: messageContent.clientDTO,
1927
1942
  clientsList: messageContent.otherClientDtoList
1928
1943
  }, function (callDivs) {