podchat-browser 12.9.12-snapshot.9 → 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 +21 -0
- package/dist/node/buildConfig.json +1 -1
- package/dist/node/call.module.js +115 -160
- package/dist/node/chat.js +8 -0
- package/dist/node/lib/call/callManager.js +8 -15
- package/dist/node/lib/call/callTopicManager.js +21 -13
- package/dist/node/lib/call/callUser.js +105 -12
- package/dist/node/lib/call/callUsers.js +5 -0
- package/dist/node/lib/call/deviceManager.js +132 -157
- package/dist/node/lib/call/multitrack/callManager.js +10 -17
- package/dist/node/lib/call/multitrack/callUser.js +163 -128
- package/dist/node/lib/chat/reactionsMethods.js +20 -2
- package/dist/node/lib/constants.js +1 -0
- package/dist/podchat-browser-bundle.js +604 -536
- package/package.json +2 -2
- package/src/buildConfig.json +1 -1
- package/src/call.module.js +30 -35
- package/src/chat.js +8 -0
- package/src/lib/call/callManager.js +5 -10
- package/src/lib/call/callTopicManager.js +23 -15
- package/src/lib/call/callUser.js +76 -14
- package/src/lib/call/callUsers.js +6 -0
- package/src/lib/call/deviceManager.js +68 -67
- package/src/lib/call/multitrack/callManager.js +7 -12
- package/src/lib/call/multitrack/callUser.js +88 -38
- package/src/lib/chat/reactionsMethods.js +23 -2
- package/src/lib/constants.js +1 -0
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.
|
|
1
|
+
{"version":"12.9.13","date":"۱۴۰۳/۴/۱۷","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
|
package/dist/node/call.module.js
CHANGED
|
@@ -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:
|
|
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,79 +1005,41 @@ function ChatCall(app, params) {
|
|
|
1020
1005
|
}
|
|
1021
1006
|
|
|
1022
1007
|
// janus
|
|
1023
|
-
this.getDevicesList =
|
|
1024
|
-
var callback
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
call,
|
|
1053
|
-
_args2 = arguments;
|
|
1054
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
1055
|
-
while (1) {
|
|
1056
|
-
switch (_context2.prev = _context2.next) {
|
|
1057
|
-
case 0:
|
|
1058
|
-
callback = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
|
|
1059
|
-
call = app.call.currentCall();
|
|
1060
|
-
if (call) {
|
|
1061
|
-
_context2.next = 5;
|
|
1062
|
-
break;
|
|
1063
|
-
}
|
|
1064
|
-
raiseCallError(_errorHandler.errorList.INVALID_CALLID, callback, true);
|
|
1065
|
-
return _context2.abrupt("return");
|
|
1066
|
-
case 5:
|
|
1067
|
-
try {
|
|
1068
|
-
call.changeMediaDevice(params);
|
|
1069
|
-
callback && callback({
|
|
1070
|
-
hasError: false,
|
|
1071
|
-
deviceId: params.deviceId
|
|
1072
|
-
});
|
|
1073
|
-
} catch (e) {
|
|
1074
|
-
raiseCallError({
|
|
1075
|
-
code: _errorHandler.errorList.CHANGE_MEDIA_DEVICE_FAILED.code,
|
|
1076
|
-
message: e.message
|
|
1077
|
-
}, callback, true);
|
|
1078
|
-
}
|
|
1079
|
-
case 6:
|
|
1080
|
-
case "end":
|
|
1081
|
-
return _context2.stop();
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
}, _callee2);
|
|
1085
|
-
}));
|
|
1086
|
-
return function (_x) {
|
|
1087
|
-
return _ref3.apply(this, arguments);
|
|
1088
|
-
};
|
|
1089
|
-
}();
|
|
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
|
+
};
|
|
1090
1037
|
this.startCall = /*#__PURE__*/function () {
|
|
1091
|
-
var
|
|
1038
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params, callback) {
|
|
1092
1039
|
var startCallData, content, audioObject, i, tempInvitee;
|
|
1093
|
-
return _regenerator["default"].wrap(function
|
|
1040
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
1094
1041
|
while (1) {
|
|
1095
|
-
switch (
|
|
1042
|
+
switch (_context.prev = _context.next) {
|
|
1096
1043
|
case 0:
|
|
1097
1044
|
startCallData = {
|
|
1098
1045
|
chatMessageVOType: _constants.chatMessageVOTypes.CALL_REQUEST,
|
|
@@ -1105,7 +1052,7 @@ function ChatCall(app, params) {
|
|
|
1105
1052
|
};
|
|
1106
1053
|
audioObject = params.audioPermissionObject ? params.audioPermissionObject : !params.mute;
|
|
1107
1054
|
if (!params) {
|
|
1108
|
-
|
|
1055
|
+
_context.next = 22;
|
|
1109
1056
|
break;
|
|
1110
1057
|
}
|
|
1111
1058
|
if (typeof params.type === 'string' && app.call.callTypes.hasOwnProperty(params.type.toUpperCase())) {
|
|
@@ -1122,15 +1069,15 @@ function ChatCall(app, params) {
|
|
|
1122
1069
|
content.creatorClientDto.clientType = app.call.callClientType.WEB;
|
|
1123
1070
|
}
|
|
1124
1071
|
if (!(typeof +params.threadId === 'number' && +params.threadId > 0)) {
|
|
1125
|
-
|
|
1072
|
+
_context.next = 11;
|
|
1126
1073
|
break;
|
|
1127
1074
|
}
|
|
1128
1075
|
content.threadId = +params.threadId;
|
|
1129
|
-
|
|
1076
|
+
_context.next = 18;
|
|
1130
1077
|
break;
|
|
1131
1078
|
case 11:
|
|
1132
1079
|
if (!(Array.isArray(params.invitees) && params.invitees.length)) {
|
|
1133
|
-
|
|
1080
|
+
_context.next = 16;
|
|
1134
1081
|
break;
|
|
1135
1082
|
}
|
|
1136
1083
|
content.invitees = []; //params.invitees;
|
|
@@ -1141,27 +1088,27 @@ function ChatCall(app, params) {
|
|
|
1141
1088
|
content.invitees.push(tempInvitee);
|
|
1142
1089
|
}
|
|
1143
1090
|
}
|
|
1144
|
-
|
|
1091
|
+
_context.next = 18;
|
|
1145
1092
|
break;
|
|
1146
1093
|
case 16:
|
|
1147
1094
|
app.chatEvents.fireEvent('error', {
|
|
1148
1095
|
code: 999,
|
|
1149
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'
|
|
1150
1097
|
});
|
|
1151
|
-
return
|
|
1098
|
+
return _context.abrupt("return");
|
|
1152
1099
|
case 18:
|
|
1153
1100
|
if (params.threadInfo && (params.threadInfo.metadata || params.threadInfo.uniqueName)) {
|
|
1154
1101
|
content.createCallThreadRequest = params.threadInfo;
|
|
1155
1102
|
}
|
|
1156
1103
|
startCallData.content = JSON.stringify(content);
|
|
1157
|
-
|
|
1104
|
+
_context.next = 24;
|
|
1158
1105
|
break;
|
|
1159
1106
|
case 22:
|
|
1160
1107
|
app.chatEvents.fireEvent('error', {
|
|
1161
1108
|
code: 999,
|
|
1162
1109
|
message: '[SDK] No params have been sent to start call!'
|
|
1163
1110
|
});
|
|
1164
|
-
return
|
|
1111
|
+
return _context.abrupt("return");
|
|
1165
1112
|
case 24:
|
|
1166
1113
|
app.call.joinCallParams.cameraPaused = typeof params.cameraPaused === 'boolean' ? params.cameraPaused : false;
|
|
1167
1114
|
callRequestController.iRequestedCall = true;
|
|
@@ -1205,21 +1152,21 @@ function ChatCall(app, params) {
|
|
|
1205
1152
|
});
|
|
1206
1153
|
case 28:
|
|
1207
1154
|
case "end":
|
|
1208
|
-
return
|
|
1155
|
+
return _context.stop();
|
|
1209
1156
|
}
|
|
1210
1157
|
}
|
|
1211
|
-
},
|
|
1158
|
+
}, _callee);
|
|
1212
1159
|
}));
|
|
1213
|
-
return function (
|
|
1214
|
-
return
|
|
1160
|
+
return function (_x, _x2) {
|
|
1161
|
+
return _ref2.apply(this, arguments);
|
|
1215
1162
|
};
|
|
1216
1163
|
}();
|
|
1217
1164
|
this.startGroupCall = /*#__PURE__*/function () {
|
|
1218
|
-
var
|
|
1165
|
+
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params, callback) {
|
|
1219
1166
|
var startCallData, content, i, tempInvitee;
|
|
1220
|
-
return _regenerator["default"].wrap(function
|
|
1167
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
1221
1168
|
while (1) {
|
|
1222
|
-
switch (
|
|
1169
|
+
switch (_context2.prev = _context2.next) {
|
|
1223
1170
|
case 0:
|
|
1224
1171
|
startCallData = {
|
|
1225
1172
|
chatMessageVOType: _constants.chatMessageVOTypes.GROUP_CALL_REQUEST,
|
|
@@ -1231,7 +1178,7 @@ function ChatCall(app, params) {
|
|
|
1231
1178
|
creatorClientDto: {}
|
|
1232
1179
|
};
|
|
1233
1180
|
if (!params) {
|
|
1234
|
-
|
|
1181
|
+
_context2.next = 20;
|
|
1235
1182
|
break;
|
|
1236
1183
|
}
|
|
1237
1184
|
if (typeof params.type === 'string' && app.call.callTypes.hasOwnProperty(params.type.toUpperCase())) {
|
|
@@ -1247,15 +1194,15 @@ function ChatCall(app, params) {
|
|
|
1247
1194
|
content.creatorClientDto.clientType = app.call.callClientType.WEB;
|
|
1248
1195
|
}
|
|
1249
1196
|
if (!(typeof +params.threadId === 'number' && params.threadId > 0)) {
|
|
1250
|
-
|
|
1197
|
+
_context2.next = 9;
|
|
1251
1198
|
break;
|
|
1252
1199
|
}
|
|
1253
1200
|
content.threadId = +params.threadId;
|
|
1254
|
-
|
|
1201
|
+
_context2.next = 16;
|
|
1255
1202
|
break;
|
|
1256
1203
|
case 9:
|
|
1257
1204
|
if (!Array.isArray(params.invitees)) {
|
|
1258
|
-
|
|
1205
|
+
_context2.next = 14;
|
|
1259
1206
|
break;
|
|
1260
1207
|
}
|
|
1261
1208
|
content.invitees = [];
|
|
@@ -1266,27 +1213,27 @@ function ChatCall(app, params) {
|
|
|
1266
1213
|
content.invitees.push(tempInvitee);
|
|
1267
1214
|
}
|
|
1268
1215
|
}
|
|
1269
|
-
|
|
1216
|
+
_context2.next = 16;
|
|
1270
1217
|
break;
|
|
1271
1218
|
case 14:
|
|
1272
1219
|
app.chatEvents.fireEvent('error', {
|
|
1273
1220
|
code: 999,
|
|
1274
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'
|
|
1275
1222
|
});
|
|
1276
|
-
return
|
|
1223
|
+
return _context2.abrupt("return");
|
|
1277
1224
|
case 16:
|
|
1278
1225
|
if (params.threadInfo && (params.threadInfo.title || params.threadInfo.description || params.threadInfo.metadata || params.threadInfo.uniqueName)) {
|
|
1279
1226
|
content.createCallThreadRequest = params.threadInfo;
|
|
1280
1227
|
}
|
|
1281
1228
|
startCallData.content = JSON.stringify(content);
|
|
1282
|
-
|
|
1229
|
+
_context2.next = 22;
|
|
1283
1230
|
break;
|
|
1284
1231
|
case 20:
|
|
1285
1232
|
app.chatEvents.fireEvent('error', {
|
|
1286
1233
|
code: 999,
|
|
1287
1234
|
message: '[SDK] No params have been sent to start call!'
|
|
1288
1235
|
});
|
|
1289
|
-
return
|
|
1236
|
+
return _context2.abrupt("return");
|
|
1290
1237
|
case 22:
|
|
1291
1238
|
app.call.joinCallParams.cameraPaused = typeof params.cameraPaused === 'boolean' ? params.cameraPaused : false;
|
|
1292
1239
|
callRequestController.iRequestedCall = true;
|
|
@@ -1329,13 +1276,13 @@ function ChatCall(app, params) {
|
|
|
1329
1276
|
});
|
|
1330
1277
|
case 26:
|
|
1331
1278
|
case "end":
|
|
1332
|
-
return
|
|
1279
|
+
return _context2.stop();
|
|
1333
1280
|
}
|
|
1334
1281
|
}
|
|
1335
|
-
},
|
|
1282
|
+
}, _callee2);
|
|
1336
1283
|
}));
|
|
1337
|
-
return function (
|
|
1338
|
-
return
|
|
1284
|
+
return function (_x3, _x4) {
|
|
1285
|
+
return _ref3.apply(this, arguments);
|
|
1339
1286
|
};
|
|
1340
1287
|
}();
|
|
1341
1288
|
this.sendCallMetaData = function (params) {
|
|
@@ -1377,11 +1324,11 @@ function ChatCall(app, params) {
|
|
|
1377
1324
|
});
|
|
1378
1325
|
};
|
|
1379
1326
|
this.acceptCall = /*#__PURE__*/function () {
|
|
1380
|
-
var
|
|
1327
|
+
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params, callback) {
|
|
1381
1328
|
var acceptCallData, content, audioObject;
|
|
1382
|
-
return _regenerator["default"].wrap(function
|
|
1329
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
1383
1330
|
while (1) {
|
|
1384
|
-
switch (
|
|
1331
|
+
switch (_context3.prev = _context3.next) {
|
|
1385
1332
|
case 0:
|
|
1386
1333
|
acceptCallData = {
|
|
1387
1334
|
chatMessageVOType: _constants.chatMessageVOTypes.ACCEPT_CALL,
|
|
@@ -1392,19 +1339,19 @@ function ChatCall(app, params) {
|
|
|
1392
1339
|
}, content = {};
|
|
1393
1340
|
audioObject = params.audioPermissionObject ? params.audioPermissionObject : !params.mute;
|
|
1394
1341
|
if (!params) {
|
|
1395
|
-
|
|
1342
|
+
_context3.next = 17;
|
|
1396
1343
|
break;
|
|
1397
1344
|
}
|
|
1398
1345
|
if (!(typeof +params.callId === 'number' && params.callId > 0)) {
|
|
1399
|
-
|
|
1346
|
+
_context3.next = 7;
|
|
1400
1347
|
break;
|
|
1401
1348
|
}
|
|
1402
1349
|
acceptCallData.subjectId = +params.callId;
|
|
1403
|
-
|
|
1350
|
+
_context3.next = 9;
|
|
1404
1351
|
break;
|
|
1405
1352
|
case 7:
|
|
1406
1353
|
app.errorHandler.raiseError(_errorHandler.errorList.INVALID_CALLID, callback, true, {});
|
|
1407
|
-
return
|
|
1354
|
+
return _context3.abrupt("return");
|
|
1408
1355
|
case 9:
|
|
1409
1356
|
content.mute = typeof params.mute === 'boolean' ? params.mute : false;
|
|
1410
1357
|
content.video = typeof params.video === 'boolean' ? params.video : false;
|
|
@@ -1416,14 +1363,14 @@ function ChatCall(app, params) {
|
|
|
1416
1363
|
content.clientType = app.call.callClientType.WEB;
|
|
1417
1364
|
}
|
|
1418
1365
|
acceptCallData.content = JSON.stringify(content);
|
|
1419
|
-
|
|
1366
|
+
_context3.next = 19;
|
|
1420
1367
|
break;
|
|
1421
1368
|
case 17:
|
|
1422
1369
|
app.chatEvents.fireEvent('error', {
|
|
1423
1370
|
code: 999,
|
|
1424
1371
|
message: '[SDK] No params have been sent to accept the call!'
|
|
1425
1372
|
});
|
|
1426
|
-
return
|
|
1373
|
+
return _context3.abrupt("return");
|
|
1427
1374
|
case 19:
|
|
1428
1375
|
app.call.sharedVariables.acceptedCallId = parseInt(params.callId);
|
|
1429
1376
|
callRequestController.iAcceptedCall = true;
|
|
@@ -1449,13 +1396,13 @@ function ChatCall(app, params) {
|
|
|
1449
1396
|
});
|
|
1450
1397
|
case 23:
|
|
1451
1398
|
case "end":
|
|
1452
|
-
return
|
|
1399
|
+
return _context3.stop();
|
|
1453
1400
|
}
|
|
1454
1401
|
}
|
|
1455
|
-
},
|
|
1402
|
+
}, _callee3);
|
|
1456
1403
|
}));
|
|
1457
|
-
return function (
|
|
1458
|
-
return
|
|
1404
|
+
return function (_x5, _x6) {
|
|
1405
|
+
return _ref4.apply(this, arguments);
|
|
1459
1406
|
};
|
|
1460
1407
|
}();
|
|
1461
1408
|
this.rejectCall = this.cancelCall = function (params, callback) {
|
|
@@ -1841,8 +1788,8 @@ function ChatCall(app, params) {
|
|
|
1841
1788
|
/**
|
|
1842
1789
|
* This method inquiries call participants from call servers
|
|
1843
1790
|
*/
|
|
1844
|
-
this.inquiryCallParticipants = function (
|
|
1845
|
-
(0, _objectDestructuringEmpty2["default"])(
|
|
1791
|
+
this.inquiryCallParticipants = function (_ref5, callback) {
|
|
1792
|
+
(0, _objectDestructuringEmpty2["default"])(_ref5);
|
|
1846
1793
|
return app.call.inquiryCallParticipants.inquiryCallParticipants({}, callback);
|
|
1847
1794
|
};
|
|
1848
1795
|
this.addCallParticipants = function (params, callback) {
|
|
@@ -2273,9 +2220,9 @@ function ChatCall(app, params) {
|
|
|
2273
2220
|
return;
|
|
2274
2221
|
}
|
|
2275
2222
|
};
|
|
2276
|
-
this.sendCallSticker = function (
|
|
2277
|
-
var
|
|
2278
|
-
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;
|
|
2279
2226
|
var sendMessageParams = {
|
|
2280
2227
|
chatMessageVOType: _constants.chatMessageVOTypes.CALL_STICKER_SYSTEM_MESSAGE,
|
|
2281
2228
|
typeCode: params.typeCode,
|
|
@@ -2297,8 +2244,8 @@ function ChatCall(app, params) {
|
|
|
2297
2244
|
}
|
|
2298
2245
|
});
|
|
2299
2246
|
};
|
|
2300
|
-
this.recallThreadParticipant = function (
|
|
2301
|
-
var invitees =
|
|
2247
|
+
this.recallThreadParticipant = function (_ref7, callback) {
|
|
2248
|
+
var invitees = _ref7.invitees;
|
|
2302
2249
|
var sendData = {
|
|
2303
2250
|
chatMessageVOType: _constants.chatMessageVOTypes.RECALL_THREAD_PARTICIPANT,
|
|
2304
2251
|
typeCode: params.typeCode,
|
|
@@ -2323,33 +2270,33 @@ function ChatCall(app, params) {
|
|
|
2323
2270
|
};
|
|
2324
2271
|
this.deviceManager = app.call.sharedVariables.deviceManager ? app.call.sharedVariables.deviceManager : app.call.currentCall() ? app.call.currentCall().deviceManager() : null;
|
|
2325
2272
|
this.resetCallStream = /*#__PURE__*/function () {
|
|
2326
|
-
var
|
|
2327
|
-
var userId,
|
|
2328
|
-
return _regenerator["default"].wrap(function
|
|
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) {
|
|
2329
2276
|
while (1) {
|
|
2330
|
-
switch (
|
|
2277
|
+
switch (_context4.prev = _context4.next) {
|
|
2331
2278
|
case 0:
|
|
2332
|
-
userId =
|
|
2279
|
+
userId = _ref8.userId, _ref8$streamType = _ref8.streamType, streamType = _ref8$streamType === void 0 ? 'audio' : _ref8$streamType;
|
|
2333
2280
|
if (app.call.currentCall()) {
|
|
2334
|
-
|
|
2281
|
+
_context4.next = 4;
|
|
2335
2282
|
break;
|
|
2336
2283
|
}
|
|
2337
2284
|
callback && callback({
|
|
2338
2285
|
hasError: true
|
|
2339
2286
|
});
|
|
2340
|
-
return
|
|
2287
|
+
return _context4.abrupt("return");
|
|
2341
2288
|
case 4:
|
|
2342
2289
|
user = app.call.currentCall().users().get(userId);
|
|
2343
2290
|
if (user) {
|
|
2344
|
-
|
|
2291
|
+
_context4.next = 8;
|
|
2345
2292
|
break;
|
|
2346
2293
|
}
|
|
2347
2294
|
callback && callback({
|
|
2348
2295
|
hasError: true
|
|
2349
2296
|
});
|
|
2350
|
-
return
|
|
2297
|
+
return _context4.abrupt("return");
|
|
2351
2298
|
case 8:
|
|
2352
|
-
|
|
2299
|
+
_context4.next = 10;
|
|
2353
2300
|
return user.reconnectTopic(streamType);
|
|
2354
2301
|
case 10:
|
|
2355
2302
|
callback && callback({
|
|
@@ -2357,13 +2304,13 @@ function ChatCall(app, params) {
|
|
|
2357
2304
|
});
|
|
2358
2305
|
case 11:
|
|
2359
2306
|
case "end":
|
|
2360
|
-
return
|
|
2307
|
+
return _context4.stop();
|
|
2361
2308
|
}
|
|
2362
2309
|
}
|
|
2363
|
-
},
|
|
2310
|
+
}, _callee4);
|
|
2364
2311
|
}));
|
|
2365
|
-
return function (
|
|
2366
|
-
return
|
|
2312
|
+
return function (_x7, _x8) {
|
|
2313
|
+
return _ref9.apply(this, arguments);
|
|
2367
2314
|
};
|
|
2368
2315
|
}();
|
|
2369
2316
|
this.resetAudioSendStream = function (callback) {
|
|
@@ -2376,12 +2323,16 @@ function ChatCall(app, params) {
|
|
|
2376
2323
|
app.call.currentCall().deviceManager().mediaStreams.stopAudioInput();
|
|
2377
2324
|
app.call.currentCall().deviceManager().grantUserMediaDevicesPermissions({
|
|
2378
2325
|
audio: true
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
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
|
+
}
|
|
2385
2336
|
});
|
|
2386
2337
|
};
|
|
2387
2338
|
this.resetVideoSendStream = function (callback) {
|
|
@@ -2394,12 +2345,16 @@ function ChatCall(app, params) {
|
|
|
2394
2345
|
app.call.currentCall().deviceManager().mediaStreams.setVideoInput();
|
|
2395
2346
|
app.call.currentCall().deviceManager().grantUserMediaDevicesPermissions({
|
|
2396
2347
|
audio: true
|
|
2397
|
-
}
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
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
|
+
}
|
|
2403
2358
|
});
|
|
2404
2359
|
};
|
|
2405
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
|
-
|
|
41
|
-
app.call.sharedVariables.deviceManager
|
|
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
|
|
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
|
|
1023
|
+
return app.call.sharedVariables.deviceManager.mediaStreams.stopScreenShareInput();
|
|
1022
1024
|
case 6:
|
|
1023
1025
|
app.chatEvents.fireEvent('callEvents', {
|
|
1024
1026
|
type: 'END_SCREEN_SHARE',
|
|
@@ -1101,9 +1103,6 @@ function CallManager(_ref) {
|
|
|
1101
1103
|
//Inquiry the call
|
|
1102
1104
|
}
|
|
1103
1105
|
},
|
|
1104
|
-
changeMediaDevice: function changeMediaDevice(params) {
|
|
1105
|
-
config.deviceManager.changeKurentoMediaDevice(params);
|
|
1106
|
-
},
|
|
1107
1106
|
destroy: function destroy() {
|
|
1108
1107
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
1109
1108
|
return _regenerator["default"].wrap(function _callee5$(_context7) {
|
|
@@ -1111,16 +1110,10 @@ function CallManager(_ref) {
|
|
|
1111
1110
|
switch (_context7.prev = _context7.next) {
|
|
1112
1111
|
case 0:
|
|
1113
1112
|
_context7.next = 2;
|
|
1114
|
-
return
|
|
1113
|
+
return app.call.sharedVariables.deviceManager.onCallEnd();
|
|
1115
1114
|
case 2:
|
|
1116
|
-
_context7.next = 4;
|
|
1117
|
-
return config.deviceManager.mediaStreams.stopVideoInput();
|
|
1118
|
-
case 4:
|
|
1119
|
-
_context7.next = 6;
|
|
1120
|
-
return config.deviceManager.mediaStreams.stopScreenShareInput();
|
|
1121
|
-
case 6:
|
|
1122
1115
|
return _context7.abrupt("return", callStop());
|
|
1123
|
-
case
|
|
1116
|
+
case 3:
|
|
1124
1117
|
case "end":
|
|
1125
1118
|
return _context7.stop();
|
|
1126
1119
|
}
|