podchat-browser 12.9.12-snapshot.8 → 12.9.13

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
@@ -5,6 +5,27 @@ to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.i
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [12.9.12] 07-07-2024
9
+
10
+ ### Added
11
+ - UniqueId to async message for call messages
12
+ - Simple history cache
13
+ - Field reactionStatus to thread object
14
+ - Method getThreadAllowedReactions
15
+
16
+ ### Fixed
17
+ - Minor bug fixes and improvements
18
+ - Fixed audio mic left open on some scenarios
19
+ - Fixed no label for media devices in firefox
20
+
21
+ ### Changed
22
+ - Disabled auto sending delivery on sdk
23
+ - add CUSTOMIZE_REACTION event and refactor CUSTOMIZE_REACTION
24
+ - Update podasync-ws-only
25
+ - Refactored media device change functionality
26
+ - Refactored functionality of method grantUserMediaDevicesPermissions (Not backward compatible)
27
+
28
+ ## [12.9.11]
8
29
  ## [12.9.10] 08-05-2024
9
30
 
10
31
  ### Added
@@ -1 +1 @@
1
- {"version":"12.9.12-snapshot.8","date":"۱۴۰۳/۴/۱۰","VersionInfo":"Release: false, Snapshot: true, Is For Test: true"}
1
+ {"version":"12.9.13","date":"۱۴۰۳/۴/۱۷","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
@@ -155,10 +155,11 @@ function ChatCall(app, params) {
155
155
  }
156
156
  var init = function init() {},
157
157
  raiseCallError = function raiseCallError(errorObject, callBack, fireEvent) {
158
+ var _app$call$currentCall;
158
159
  app.errorHandler.raiseError(errorObject, callBack, fireEvent, {
159
160
  eventName: 'callEvents',
160
161
  eventType: 'CALL_ERROR',
161
- environmentDetails: getSDKCallDetails()
162
+ environmentDetails: (_app$call$currentCall = app.call.currentCall()) === null || _app$call$currentCall === void 0 ? void 0 : _app$call$currentCall.getCallDetails()
162
163
  });
163
164
  },
164
165
  sendCallMessage = function sendCallMessage(message, callback, _ref) {
@@ -392,22 +393,6 @@ function ChatCall(app, params) {
392
393
  message: JSON.stringify(message),
393
394
  chatId: app.callsManager.currentCallId
394
395
  }, null, {});
395
- },
396
- getSDKCallDetails = function getSDKCallDetails(customData) {
397
- return {
398
- currentUser: app.store.user.get(),
399
- currentServers: {
400
- callTurnIp: app.call.sharedVariables.callTurnIp
401
- },
402
- isJanus: app.callsManager.currentCallId && callServerController.isJanus(),
403
- screenShareInfo: {
404
- isStarted: screenShareInfo.isStarted(),
405
- iAmOwner: screenShareInfo.iAmOwner()
406
- },
407
- callId: app.callsManager.currentCallId,
408
- startCallInfo: currentCallParams,
409
- customData: customData
410
- };
411
396
  };
412
397
  this.callMessageHandler = function (callMessage) {
413
398
  var jsonMessage = typeof callMessage.content === 'string' && _utility["default"].isValidJson(callMessage.content) ? JSON.parse(callMessage.content) : callMessage.content;
@@ -1020,85 +1005,41 @@ function ChatCall(app, params) {
1020
1005
  }
1021
1006
 
1022
1007
  // janus
1023
- this.getDevicesList = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
1024
- var callback,
1025
- _args = arguments;
1026
- return _regenerator["default"].wrap(function _callee$(_context) {
1027
- while (1) {
1028
- switch (_context.prev = _context.next) {
1029
- case 0:
1030
- callback = _args.length > 0 && _args[0] !== undefined ? _args[0] : null;
1031
- if (app.call.currentCall()) {
1032
- _context.next = 4;
1033
- break;
1034
- }
1035
- raiseCallError(_errorHandler.errorList.INVALID_CALLID, callback, true);
1036
- return _context.abrupt("return");
1037
- case 4:
1038
- _context.next = 6;
1039
- return app.call.currentCall().deviceManager().getMediaDevices(callback);
1040
- case 6:
1041
- return _context.abrupt("return", _context.sent);
1042
- case 7:
1043
- case "end":
1044
- return _context.stop();
1045
- }
1046
- }
1047
- }, _callee);
1048
- }));
1049
- this.changeMediaDevice = /*#__PURE__*/function () {
1050
- var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
1051
- var callback,
1052
- call,
1053
- deviceManager,
1054
- _args2 = arguments;
1055
- return _regenerator["default"].wrap(function _callee2$(_context2) {
1056
- while (1) {
1057
- switch (_context2.prev = _context2.next) {
1058
- case 0:
1059
- callback = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
1060
- call = app.call.currentCall();
1061
- if (call) {
1062
- _context2.next = 5;
1063
- break;
1064
- }
1065
- raiseCallError(_errorHandler.errorList.INVALID_CALLID, callback, true);
1066
- return _context2.abrupt("return");
1067
- case 5:
1068
- deviceManager = app.call.currentCall().deviceManager();
1069
- try {
1070
- if (call.callServerController().isJanus()) {
1071
- deviceManager.changeJanusMediaDevice(params);
1072
- } else {
1073
- deviceManager.changeKurentoMediaDevice(params);
1074
- }
1075
- callback && callback({
1076
- hasError: false,
1077
- deviceId: params.deviceId
1078
- });
1079
- } catch (e) {
1080
- raiseCallError({
1081
- code: _errorHandler.errorList.CHANGE_MEDIA_DEVICE_FAILED.code,
1082
- message: e.message
1083
- }, callback, true);
1084
- }
1085
- case 7:
1086
- case "end":
1087
- return _context2.stop();
1088
- }
1089
- }
1090
- }, _callee2);
1091
- }));
1092
- return function (_x) {
1093
- return _ref3.apply(this, arguments);
1094
- };
1095
- }();
1008
+ this.getDevicesList = function () {
1009
+ var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1010
+ if (!app.call.currentCall()) {
1011
+ raiseCallError(_errorHandler.errorList.INVALID_CALLID, callback, true);
1012
+ return;
1013
+ }
1014
+ app.call.currentCall().deviceManager().getMediaDevices(callback);
1015
+ };
1016
+ this.changeMediaDevice = function (params) {
1017
+ var call = app.call.currentCall();
1018
+ if (!call) {
1019
+ raiseCallError(_errorHandler.errorList.INVALID_CALLID, null, true);
1020
+ return;
1021
+ }
1022
+ try {
1023
+ call.deviceManager().changeMediaDevice(params, function () {
1024
+ app.chatEvents.fireEvent('callEvents', {
1025
+ type: 'MEDIA_DEVICE_CHANGED',
1026
+ result: params
1027
+ });
1028
+ });
1029
+ // callback && callback({hasError: false, deviceId: params.deviceId})
1030
+ } catch (e) {
1031
+ raiseCallError({
1032
+ code: _errorHandler.errorList.CHANGE_MEDIA_DEVICE_FAILED.code,
1033
+ message: e.message
1034
+ }, null, true);
1035
+ }
1036
+ };
1096
1037
  this.startCall = /*#__PURE__*/function () {
1097
- var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params, callback) {
1038
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params, callback) {
1098
1039
  var startCallData, content, audioObject, i, tempInvitee;
1099
- return _regenerator["default"].wrap(function _callee3$(_context3) {
1040
+ return _regenerator["default"].wrap(function _callee$(_context) {
1100
1041
  while (1) {
1101
- switch (_context3.prev = _context3.next) {
1042
+ switch (_context.prev = _context.next) {
1102
1043
  case 0:
1103
1044
  startCallData = {
1104
1045
  chatMessageVOType: _constants.chatMessageVOTypes.CALL_REQUEST,
@@ -1111,7 +1052,7 @@ function ChatCall(app, params) {
1111
1052
  };
1112
1053
  audioObject = params.audioPermissionObject ? params.audioPermissionObject : !params.mute;
1113
1054
  if (!params) {
1114
- _context3.next = 22;
1055
+ _context.next = 22;
1115
1056
  break;
1116
1057
  }
1117
1058
  if (typeof params.type === 'string' && app.call.callTypes.hasOwnProperty(params.type.toUpperCase())) {
@@ -1128,15 +1069,15 @@ function ChatCall(app, params) {
1128
1069
  content.creatorClientDto.clientType = app.call.callClientType.WEB;
1129
1070
  }
1130
1071
  if (!(typeof +params.threadId === 'number' && +params.threadId > 0)) {
1131
- _context3.next = 11;
1072
+ _context.next = 11;
1132
1073
  break;
1133
1074
  }
1134
1075
  content.threadId = +params.threadId;
1135
- _context3.next = 18;
1076
+ _context.next = 18;
1136
1077
  break;
1137
1078
  case 11:
1138
1079
  if (!(Array.isArray(params.invitees) && params.invitees.length)) {
1139
- _context3.next = 16;
1080
+ _context.next = 16;
1140
1081
  break;
1141
1082
  }
1142
1083
  content.invitees = []; //params.invitees;
@@ -1147,27 +1088,27 @@ function ChatCall(app, params) {
1147
1088
  content.invitees.push(tempInvitee);
1148
1089
  }
1149
1090
  }
1150
- _context3.next = 18;
1091
+ _context.next = 18;
1151
1092
  break;
1152
1093
  case 16:
1153
1094
  app.chatEvents.fireEvent('error', {
1154
1095
  code: 999,
1155
1096
  message: '[SDK] Invitees list is empty! Send an array of invitees to start a call with, Or send a Thread Id to start a call with current participants'
1156
1097
  });
1157
- return _context3.abrupt("return");
1098
+ return _context.abrupt("return");
1158
1099
  case 18:
1159
1100
  if (params.threadInfo && (params.threadInfo.metadata || params.threadInfo.uniqueName)) {
1160
1101
  content.createCallThreadRequest = params.threadInfo;
1161
1102
  }
1162
1103
  startCallData.content = JSON.stringify(content);
1163
- _context3.next = 24;
1104
+ _context.next = 24;
1164
1105
  break;
1165
1106
  case 22:
1166
1107
  app.chatEvents.fireEvent('error', {
1167
1108
  code: 999,
1168
1109
  message: '[SDK] No params have been sent to start call!'
1169
1110
  });
1170
- return _context3.abrupt("return");
1111
+ return _context.abrupt("return");
1171
1112
  case 24:
1172
1113
  app.call.joinCallParams.cameraPaused = typeof params.cameraPaused === 'boolean' ? params.cameraPaused : false;
1173
1114
  callRequestController.iRequestedCall = true;
@@ -1211,21 +1152,21 @@ function ChatCall(app, params) {
1211
1152
  });
1212
1153
  case 28:
1213
1154
  case "end":
1214
- return _context3.stop();
1155
+ return _context.stop();
1215
1156
  }
1216
1157
  }
1217
- }, _callee3);
1158
+ }, _callee);
1218
1159
  }));
1219
- return function (_x2, _x3) {
1220
- return _ref4.apply(this, arguments);
1160
+ return function (_x, _x2) {
1161
+ return _ref2.apply(this, arguments);
1221
1162
  };
1222
1163
  }();
1223
1164
  this.startGroupCall = /*#__PURE__*/function () {
1224
- var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(params, callback) {
1165
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params, callback) {
1225
1166
  var startCallData, content, i, tempInvitee;
1226
- return _regenerator["default"].wrap(function _callee4$(_context4) {
1167
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
1227
1168
  while (1) {
1228
- switch (_context4.prev = _context4.next) {
1169
+ switch (_context2.prev = _context2.next) {
1229
1170
  case 0:
1230
1171
  startCallData = {
1231
1172
  chatMessageVOType: _constants.chatMessageVOTypes.GROUP_CALL_REQUEST,
@@ -1237,7 +1178,7 @@ function ChatCall(app, params) {
1237
1178
  creatorClientDto: {}
1238
1179
  };
1239
1180
  if (!params) {
1240
- _context4.next = 20;
1181
+ _context2.next = 20;
1241
1182
  break;
1242
1183
  }
1243
1184
  if (typeof params.type === 'string' && app.call.callTypes.hasOwnProperty(params.type.toUpperCase())) {
@@ -1253,15 +1194,15 @@ function ChatCall(app, params) {
1253
1194
  content.creatorClientDto.clientType = app.call.callClientType.WEB;
1254
1195
  }
1255
1196
  if (!(typeof +params.threadId === 'number' && params.threadId > 0)) {
1256
- _context4.next = 9;
1197
+ _context2.next = 9;
1257
1198
  break;
1258
1199
  }
1259
1200
  content.threadId = +params.threadId;
1260
- _context4.next = 16;
1201
+ _context2.next = 16;
1261
1202
  break;
1262
1203
  case 9:
1263
1204
  if (!Array.isArray(params.invitees)) {
1264
- _context4.next = 14;
1205
+ _context2.next = 14;
1265
1206
  break;
1266
1207
  }
1267
1208
  content.invitees = [];
@@ -1272,27 +1213,27 @@ function ChatCall(app, params) {
1272
1213
  content.invitees.push(tempInvitee);
1273
1214
  }
1274
1215
  }
1275
- _context4.next = 16;
1216
+ _context2.next = 16;
1276
1217
  break;
1277
1218
  case 14:
1278
1219
  app.chatEvents.fireEvent('error', {
1279
1220
  code: 999,
1280
1221
  message: '[SDK] Invitees list is empty! Send an array of invitees to start a call with, Or send a Thread Id to start a call with current participants'
1281
1222
  });
1282
- return _context4.abrupt("return");
1223
+ return _context2.abrupt("return");
1283
1224
  case 16:
1284
1225
  if (params.threadInfo && (params.threadInfo.title || params.threadInfo.description || params.threadInfo.metadata || params.threadInfo.uniqueName)) {
1285
1226
  content.createCallThreadRequest = params.threadInfo;
1286
1227
  }
1287
1228
  startCallData.content = JSON.stringify(content);
1288
- _context4.next = 22;
1229
+ _context2.next = 22;
1289
1230
  break;
1290
1231
  case 20:
1291
1232
  app.chatEvents.fireEvent('error', {
1292
1233
  code: 999,
1293
1234
  message: '[SDK] No params have been sent to start call!'
1294
1235
  });
1295
- return _context4.abrupt("return");
1236
+ return _context2.abrupt("return");
1296
1237
  case 22:
1297
1238
  app.call.joinCallParams.cameraPaused = typeof params.cameraPaused === 'boolean' ? params.cameraPaused : false;
1298
1239
  callRequestController.iRequestedCall = true;
@@ -1335,13 +1276,13 @@ function ChatCall(app, params) {
1335
1276
  });
1336
1277
  case 26:
1337
1278
  case "end":
1338
- return _context4.stop();
1279
+ return _context2.stop();
1339
1280
  }
1340
1281
  }
1341
- }, _callee4);
1282
+ }, _callee2);
1342
1283
  }));
1343
- return function (_x4, _x5) {
1344
- return _ref5.apply(this, arguments);
1284
+ return function (_x3, _x4) {
1285
+ return _ref3.apply(this, arguments);
1345
1286
  };
1346
1287
  }();
1347
1288
  this.sendCallMetaData = function (params) {
@@ -1383,11 +1324,11 @@ function ChatCall(app, params) {
1383
1324
  });
1384
1325
  };
1385
1326
  this.acceptCall = /*#__PURE__*/function () {
1386
- var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(params, callback) {
1327
+ var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params, callback) {
1387
1328
  var acceptCallData, content, audioObject;
1388
- return _regenerator["default"].wrap(function _callee5$(_context5) {
1329
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
1389
1330
  while (1) {
1390
- switch (_context5.prev = _context5.next) {
1331
+ switch (_context3.prev = _context3.next) {
1391
1332
  case 0:
1392
1333
  acceptCallData = {
1393
1334
  chatMessageVOType: _constants.chatMessageVOTypes.ACCEPT_CALL,
@@ -1398,19 +1339,19 @@ function ChatCall(app, params) {
1398
1339
  }, content = {};
1399
1340
  audioObject = params.audioPermissionObject ? params.audioPermissionObject : !params.mute;
1400
1341
  if (!params) {
1401
- _context5.next = 17;
1342
+ _context3.next = 17;
1402
1343
  break;
1403
1344
  }
1404
1345
  if (!(typeof +params.callId === 'number' && params.callId > 0)) {
1405
- _context5.next = 7;
1346
+ _context3.next = 7;
1406
1347
  break;
1407
1348
  }
1408
1349
  acceptCallData.subjectId = +params.callId;
1409
- _context5.next = 9;
1350
+ _context3.next = 9;
1410
1351
  break;
1411
1352
  case 7:
1412
1353
  app.errorHandler.raiseError(_errorHandler.errorList.INVALID_CALLID, callback, true, {});
1413
- return _context5.abrupt("return");
1354
+ return _context3.abrupt("return");
1414
1355
  case 9:
1415
1356
  content.mute = typeof params.mute === 'boolean' ? params.mute : false;
1416
1357
  content.video = typeof params.video === 'boolean' ? params.video : false;
@@ -1422,14 +1363,14 @@ function ChatCall(app, params) {
1422
1363
  content.clientType = app.call.callClientType.WEB;
1423
1364
  }
1424
1365
  acceptCallData.content = JSON.stringify(content);
1425
- _context5.next = 19;
1366
+ _context3.next = 19;
1426
1367
  break;
1427
1368
  case 17:
1428
1369
  app.chatEvents.fireEvent('error', {
1429
1370
  code: 999,
1430
1371
  message: '[SDK] No params have been sent to accept the call!'
1431
1372
  });
1432
- return _context5.abrupt("return");
1373
+ return _context3.abrupt("return");
1433
1374
  case 19:
1434
1375
  app.call.sharedVariables.acceptedCallId = parseInt(params.callId);
1435
1376
  callRequestController.iAcceptedCall = true;
@@ -1455,13 +1396,13 @@ function ChatCall(app, params) {
1455
1396
  });
1456
1397
  case 23:
1457
1398
  case "end":
1458
- return _context5.stop();
1399
+ return _context3.stop();
1459
1400
  }
1460
1401
  }
1461
- }, _callee5);
1402
+ }, _callee3);
1462
1403
  }));
1463
- return function (_x6, _x7) {
1464
- return _ref6.apply(this, arguments);
1404
+ return function (_x5, _x6) {
1405
+ return _ref4.apply(this, arguments);
1465
1406
  };
1466
1407
  }();
1467
1408
  this.rejectCall = this.cancelCall = function (params, callback) {
@@ -1847,8 +1788,8 @@ function ChatCall(app, params) {
1847
1788
  /**
1848
1789
  * This method inquiries call participants from call servers
1849
1790
  */
1850
- this.inquiryCallParticipants = function (_ref7, callback) {
1851
- (0, _objectDestructuringEmpty2["default"])(_ref7);
1791
+ this.inquiryCallParticipants = function (_ref5, callback) {
1792
+ (0, _objectDestructuringEmpty2["default"])(_ref5);
1852
1793
  return app.call.inquiryCallParticipants.inquiryCallParticipants({}, callback);
1853
1794
  };
1854
1795
  this.addCallParticipants = function (params, callback) {
@@ -2279,9 +2220,9 @@ function ChatCall(app, params) {
2279
2220
  return;
2280
2221
  }
2281
2222
  };
2282
- this.sendCallSticker = function (_ref8, callback) {
2283
- var _ref8$sticker = _ref8.sticker,
2284
- sticker = _ref8$sticker === void 0 ? _constants.callStickerTypes.RAISE_HAND : _ref8$sticker;
2223
+ this.sendCallSticker = function (_ref6, callback) {
2224
+ var _ref6$sticker = _ref6.sticker,
2225
+ sticker = _ref6$sticker === void 0 ? _constants.callStickerTypes.RAISE_HAND : _ref6$sticker;
2285
2226
  var sendMessageParams = {
2286
2227
  chatMessageVOType: _constants.chatMessageVOTypes.CALL_STICKER_SYSTEM_MESSAGE,
2287
2228
  typeCode: params.typeCode,
@@ -2303,8 +2244,8 @@ function ChatCall(app, params) {
2303
2244
  }
2304
2245
  });
2305
2246
  };
2306
- this.recallThreadParticipant = function (_ref9, callback) {
2307
- var invitees = _ref9.invitees;
2247
+ this.recallThreadParticipant = function (_ref7, callback) {
2248
+ var invitees = _ref7.invitees;
2308
2249
  var sendData = {
2309
2250
  chatMessageVOType: _constants.chatMessageVOTypes.RECALL_THREAD_PARTICIPANT,
2310
2251
  typeCode: params.typeCode,
@@ -2329,33 +2270,33 @@ function ChatCall(app, params) {
2329
2270
  };
2330
2271
  this.deviceManager = app.call.sharedVariables.deviceManager ? app.call.sharedVariables.deviceManager : app.call.currentCall() ? app.call.currentCall().deviceManager() : null;
2331
2272
  this.resetCallStream = /*#__PURE__*/function () {
2332
- var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(_ref10, callback) {
2333
- var userId, _ref10$streamType, streamType, user;
2334
- return _regenerator["default"].wrap(function _callee6$(_context6) {
2273
+ var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(_ref8, callback) {
2274
+ var userId, _ref8$streamType, streamType, user;
2275
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
2335
2276
  while (1) {
2336
- switch (_context6.prev = _context6.next) {
2277
+ switch (_context4.prev = _context4.next) {
2337
2278
  case 0:
2338
- userId = _ref10.userId, _ref10$streamType = _ref10.streamType, streamType = _ref10$streamType === void 0 ? 'audio' : _ref10$streamType;
2279
+ userId = _ref8.userId, _ref8$streamType = _ref8.streamType, streamType = _ref8$streamType === void 0 ? 'audio' : _ref8$streamType;
2339
2280
  if (app.call.currentCall()) {
2340
- _context6.next = 4;
2281
+ _context4.next = 4;
2341
2282
  break;
2342
2283
  }
2343
2284
  callback && callback({
2344
2285
  hasError: true
2345
2286
  });
2346
- return _context6.abrupt("return");
2287
+ return _context4.abrupt("return");
2347
2288
  case 4:
2348
2289
  user = app.call.currentCall().users().get(userId);
2349
2290
  if (user) {
2350
- _context6.next = 8;
2291
+ _context4.next = 8;
2351
2292
  break;
2352
2293
  }
2353
2294
  callback && callback({
2354
2295
  hasError: true
2355
2296
  });
2356
- return _context6.abrupt("return");
2297
+ return _context4.abrupt("return");
2357
2298
  case 8:
2358
- _context6.next = 10;
2299
+ _context4.next = 10;
2359
2300
  return user.reconnectTopic(streamType);
2360
2301
  case 10:
2361
2302
  callback && callback({
@@ -2363,13 +2304,13 @@ function ChatCall(app, params) {
2363
2304
  });
2364
2305
  case 11:
2365
2306
  case "end":
2366
- return _context6.stop();
2307
+ return _context4.stop();
2367
2308
  }
2368
2309
  }
2369
- }, _callee6);
2310
+ }, _callee4);
2370
2311
  }));
2371
- return function (_x8, _x9) {
2372
- return _ref11.apply(this, arguments);
2312
+ return function (_x7, _x8) {
2313
+ return _ref9.apply(this, arguments);
2373
2314
  };
2374
2315
  }();
2375
2316
  this.resetAudioSendStream = function (callback) {
@@ -2382,12 +2323,16 @@ function ChatCall(app, params) {
2382
2323
  app.call.currentCall().deviceManager().mediaStreams.stopAudioInput();
2383
2324
  app.call.currentCall().deviceManager().grantUserMediaDevicesPermissions({
2384
2325
  audio: true
2385
- }).then(function () {
2386
- var user = app.call.currentCall().users().get(app.store.user.get().id);
2387
- user.audioTopicManager().updateStream(app.call.currentCall().deviceManager().mediaStreams.getAudioInput());
2388
- callback && callback({
2389
- hasError: false
2390
- });
2326
+ }, function (result) {
2327
+ if (!result.hasError) {
2328
+ var user = app.call.currentCall().users().get(app.store.user.get().id);
2329
+ user.audioTopicManager().updateStream(app.call.currentCall().deviceManager().mediaStreams.getAudioInput());
2330
+ callback && callback({
2331
+ hasError: false
2332
+ });
2333
+ } else {
2334
+ callback && callback(result);
2335
+ }
2391
2336
  });
2392
2337
  };
2393
2338
  this.resetVideoSendStream = function (callback) {
@@ -2400,12 +2345,16 @@ function ChatCall(app, params) {
2400
2345
  app.call.currentCall().deviceManager().mediaStreams.setVideoInput();
2401
2346
  app.call.currentCall().deviceManager().grantUserMediaDevicesPermissions({
2402
2347
  audio: true
2403
- }).then(function () {
2404
- var user = app.call.currentCall().users().get(app.store.user.get().id);
2405
- user.videoTopicManager().updateStream(app.call.currentCall().deviceManager().mediaStreams.getVideoInput());
2406
- callback && callback({
2407
- hasError: false
2408
- });
2348
+ }, function (result) {
2349
+ if (!result.hasError) {
2350
+ var user = app.call.currentCall().users().get(app.store.user.get().id);
2351
+ user.videoTopicManager().updateStream(app.call.currentCall().deviceManager().mediaStreams.getVideoInput());
2352
+ callback && callback({
2353
+ hasError: false
2354
+ });
2355
+ } else {
2356
+ callback && callback(result);
2357
+ }
2409
2358
  });
2410
2359
  };
2411
2360
  this.startPrintStatus = function (callUserId, mediaType) {
package/dist/node/chat.js CHANGED
@@ -2281,6 +2281,13 @@ function Chat(params) {
2281
2281
  });
2282
2282
  break;
2283
2283
 
2284
+ /**
2285
+ * Type 255 GET_THREAD_ALLOWED_REACTIONS
2286
+ */
2287
+ case _constants.chatMessageVOTypes.GET_THREAD_ALLOWED_REACTIONS:
2288
+ reactionsMethods.onGetThreadAllowedReactions(uniqueId, messageContent);
2289
+ break;
2290
+
2284
2291
  /**
2285
2292
  * Type 999 All unknown errors
2286
2293
  */
@@ -8908,6 +8915,7 @@ function Chat(params) {
8908
8915
  publicized.getReactionList = reactionsMethods.getReactionList;
8909
8916
  publicized.getReactionsSummaries = reactionsMethods.getReactionsSummaries;
8910
8917
  publicized.customizeReaction = reactionsMethods.customizeReaction;
8918
+ publicized.getThreadAllowedReactions = reactionsMethods.getThreadAllowedReactions;
8911
8919
  publicized.version = function () {
8912
8920
  console.log("%c[SDK] Version: podchat-browser@" + _buildConfig["default"].version, "color:green; font-size:13px");
8913
8921
  console.log("%c[SDK] Build date:" + _buildConfig["default"].date, "color:green;font-size:13px");
@@ -37,8 +37,10 @@ function CallManager(_ref) {
37
37
  new Promise(function (resolve) {
38
38
  var callVideo = typeof callConfig.video === 'boolean' ? callConfig.video : true,
39
39
  callMute = typeof callConfig.mute === 'boolean' ? callConfig.mute : false;
40
- config.deviceManager = app.call.sharedVariables.deviceManager;
41
- app.call.sharedVariables.deviceManager = null;
40
+
41
+ // config.deviceManager = app.call.sharedVariables.deviceManager;
42
+ // app.call.sharedVariables.deviceManager = null;
43
+
42
44
  if (callConfig.selfData) {
43
45
  callConfig.selfData.callId = config.callId;
44
46
  callConfig.selfData.cameraPaused = callConfig.cameraPaused;
@@ -491,7 +493,7 @@ function CallManager(_ref) {
491
493
  return config.users;
492
494
  },
493
495
  deviceManager: function deviceManager() {
494
- return config.deviceManager;
496
+ return app.call.sharedVariables.deviceManager;
495
497
  },
496
498
  sendCallDivs: function sendCallDivs() {
497
499
  app.chatEvents.fireEvent('callEvents', {
@@ -1018,7 +1020,7 @@ function CallManager(_ref) {
1018
1020
  return config.users.removeItem('screenShare');
1019
1021
  case 4:
1020
1022
  _context6.next = 6;
1021
- return config.deviceManager.mediaStreams.stopScreenShareInput();
1023
+ return app.call.sharedVariables.deviceManager.mediaStreams.stopScreenShareInput();
1022
1024
  case 6:
1023
1025
  app.chatEvents.fireEvent('callEvents', {
1024
1026
  type: 'END_SCREEN_SHARE',
@@ -1108,16 +1110,10 @@ function CallManager(_ref) {
1108
1110
  switch (_context7.prev = _context7.next) {
1109
1111
  case 0:
1110
1112
  _context7.next = 2;
1111
- return config.deviceManager.mediaStreams.stopAudioInput();
1113
+ return app.call.sharedVariables.deviceManager.onCallEnd();
1112
1114
  case 2:
1113
- _context7.next = 4;
1114
- return config.deviceManager.mediaStreams.stopVideoInput();
1115
- case 4:
1116
- _context7.next = 6;
1117
- return config.deviceManager.mediaStreams.stopScreenShareInput();
1118
- case 6:
1119
1115
  return _context7.abrupt("return", callStop());
1120
- case 7:
1116
+ case 3:
1121
1117
  case "end":
1122
1118
  return _context7.stop();
1123
1119
  }