podchat-browser 12.9.18-snapshot.8 → 12.9.18
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 +34 -0
- package/dist/node/buildConfig.json +1 -1
- package/dist/node/call.module.js +2 -1
- package/dist/node/chat.js +19 -16
- package/dist/node/lib/call/callManager.js +136 -134
- package/dist/node/lib/call/multitrack/callManager.js +59 -80
- package/dist/node/lib/call/multitrack/callUser.js +9 -0
- package/dist/node/lib/call/multitrack/peerConnectionManager.js +6 -0
- package/dist/node/lib/chat/threadHistoryMethods.js +4 -0
- package/dist/node/lib/constants.js +17 -2
- package/dist/node/lib/sdkParams.js +2 -0
- package/dist/node/lib/store/history/requestParams.js +1 -1
- package/dist/podchat-browser-bundle.js +251 -227
- package/examples/index.html +5 -7
- package/package.json +2 -4
- package/src/buildConfig.json +1 -1
- package/src/call.module.js +3 -1
- package/src/chat.js +19 -15
- package/src/lib/call/callManager.js +124 -122
- package/src/lib/call/multitrack/callManager.js +70 -73
- package/src/lib/call/multitrack/callUser.js +12 -1
- package/src/lib/call/multitrack/peerConnectionManager.js +7 -0
- package/src/lib/chat/threadHistoryMethods.js +4 -0
- package/src/lib/chat/threadMethods.js +3 -3
- package/src/lib/constants.js +17 -1
- package/src/lib/sdkParams.js +3 -0
- package/src/lib/store/history/requestParams.js +1 -0
package/changelog.md
CHANGED
|
@@ -5,10 +5,44 @@ to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.i
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [12.9.18] 16-12-2025
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- History cache updated
|
|
13
|
+
- Added uniqueId to getHistory callback
|
|
14
|
+
- Added method forceJoin
|
|
15
|
+
- Added uniqueId to getHistory params
|
|
16
|
+
- Prevent raising event SWITCH_TO_GROUP_CALL_REQUEST when we are not in an active call
|
|
17
|
+
- Added error code and end the call when turn server is inaccessible
|
|
18
|
+
- Added block unblock events
|
|
19
|
+
- Added callLogs
|
|
20
|
+
- Added param repliedMessageId to method getHistory
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed screanshare bug in call_streams
|
|
25
|
+
- Fixed a bug in changeMediaStream
|
|
26
|
+
- Prevent modification of htmlElements when calldivs disabled
|
|
27
|
+
- Update audio stream for client after change
|
|
28
|
+
- Fixed a bug when muting others in the call
|
|
29
|
+
- Fixed bug in change microphone
|
|
30
|
+
- Fixed bug in kurento call messages queue
|
|
31
|
+
- Fixed infinite retries on export thread members
|
|
32
|
+
- Fixed internal and performance problems in methods changeVideoStream, changeAudioStream , by calling ontrackcallback after changes
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Allow threadId and invitees in startGroupCall (Invite limited number of participants to call)
|
|
37
|
+
- Removed event CALL_RECORDING_STARTED and STOP_RECORDING_CALL on reconnect
|
|
38
|
+
- Added delay in exportThreadParticipants to prevent being blocked
|
|
39
|
+
- Clean unused packages
|
|
40
|
+
|
|
8
41
|
## [12.9.17] 23-08-2025
|
|
9
42
|
|
|
10
43
|
### Added
|
|
11
44
|
|
|
45
|
+
|
|
12
46
|
- Added optional in memory cache for getThreads
|
|
13
47
|
- Added optional in memory cache for getHistory
|
|
14
48
|
- Added cache for method getHistoryByMessageIdRange
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"12.9.18
|
|
1
|
+
{"version":"12.9.18","date":"۱۴۰۴/۱۰/۱۵","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
|
package/dist/node/call.module.js
CHANGED
|
@@ -1260,6 +1260,7 @@ function ChatCall(app, params) {
|
|
|
1260
1260
|
screenShareOwner: +messageContent.chatDataDto.screenShareUser,
|
|
1261
1261
|
recordingOwner: +messageContent.chatDataDto.recordingUser,
|
|
1262
1262
|
kurentoAddress: messageContent.chatDataDto.kurentoAddress.split(','),
|
|
1263
|
+
tInfo: messageContent.chatDataDto.turnInfo.split(','),
|
|
1263
1264
|
cameraPaused: app.call.joinCallParams.cameraPaused
|
|
1264
1265
|
};
|
|
1265
1266
|
app.callsManager.addItem(threadId, options);
|
|
@@ -2528,7 +2529,7 @@ function ChatCall(app, params) {
|
|
|
2528
2529
|
}
|
|
2529
2530
|
|
|
2530
2531
|
if (app.call.currentCall().callServerController().isJanus()) {
|
|
2531
|
-
app.call.currentCall().handleParticipantMuteForMe();
|
|
2532
|
+
if (params.userIds.includes(app.store.user.get().id)) app.call.currentCall().handleParticipantMuteForMe();
|
|
2532
2533
|
}
|
|
2533
2534
|
|
|
2534
2535
|
app.requestBlocker.add({
|
package/dist/node/chat.js
CHANGED
|
@@ -350,6 +350,7 @@ function Chat(params) {
|
|
|
350
350
|
onStartWithRetryStepGreaterThanZero: onAsyncStateChange,
|
|
351
351
|
msgLogCallback: msgLogCallback || null,
|
|
352
352
|
asyncLogCallback: asyncLogCallback || null,
|
|
353
|
+
useProtoBuf: app.sdkParams.useProtoBuf,
|
|
353
354
|
onDeviceId: onDeviceId
|
|
354
355
|
});
|
|
355
356
|
|
|
@@ -993,7 +994,7 @@ function Chat(params) {
|
|
|
993
994
|
break;
|
|
994
995
|
|
|
995
996
|
/**
|
|
996
|
-
* Type 15 Get Message History of
|
|
997
|
+
* Type 15 Get Message History of a Thread
|
|
997
998
|
*/
|
|
998
999
|
|
|
999
1000
|
case _constants.chatMessageVOTypes.GET_HISTORY:
|
|
@@ -3830,7 +3831,7 @@ function Chat(params) {
|
|
|
3830
3831
|
}
|
|
3831
3832
|
|
|
3832
3833
|
if (params.randomFileName) {
|
|
3833
|
-
uploadImageData.
|
|
3834
|
+
uploadImageData.filename = _utility["default"].generateUUID() + '.' + fileExtension;
|
|
3834
3835
|
} else {
|
|
3835
3836
|
uploadImageData.filename = fileName;
|
|
3836
3837
|
}
|
|
@@ -3862,7 +3863,7 @@ function Chat(params) {
|
|
|
3862
3863
|
uploadImageData.x = parseInt(params.xC) || 0;
|
|
3863
3864
|
uploadImageData.y = parseInt(params.yC) || 0;
|
|
3864
3865
|
uploadImageData.height = parseInt(params.hC) || fileHeight;
|
|
3865
|
-
uploadImageData.
|
|
3866
|
+
uploadImageData.width = parseInt(params.wC) || fileWidth;
|
|
3866
3867
|
|
|
3867
3868
|
if (!params.addToGroupRetryCount) {
|
|
3868
3869
|
params.addToGroupRetryCount = 0;
|
|
@@ -4739,22 +4740,24 @@ function Chat(params) {
|
|
|
4739
4740
|
});
|
|
4740
4741
|
|
|
4741
4742
|
if (stackArr.length < wantedCount) {
|
|
4742
|
-
stepCount = wantedCount - stackArr.length < stepCount ? wantedCount - stackArr.length : stepCount;
|
|
4743
|
-
|
|
4744
|
-
|
|
4743
|
+
stepCount = wantedCount - stackArr.length < stepCount ? wantedCount - stackArr.length : stepCount;
|
|
4744
|
+
setTimeout(function () {
|
|
4745
|
+
resolve(requestExportThreadParticipants(stackArr, wantedCount, stepCount, stackArr.length, sendData));
|
|
4746
|
+
}, 1000);
|
|
4745
4747
|
} else {
|
|
4746
4748
|
resolve(stackArr);
|
|
4747
4749
|
}
|
|
4748
4750
|
});
|
|
4749
4751
|
} else {
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
|
-
|
|
4752
|
+
console.error("[SDK][exportChat] Problem in one step... . Rerunning the request.", wantedCount, stepCount, stackArr.length, sendData, result);
|
|
4753
|
+
reject(result); // if (result.errorCode !== 21) {
|
|
4754
|
+
// console.error("[SDK][exportChat] Problem in one step... . Rerunning the request.", wantedCount, stepCount, stackArr.length, sendData, result);
|
|
4755
|
+
// setTimeout(function () {
|
|
4756
|
+
// resolve(requestExportThreadParticipants(stackArr, wantedCount, stepCount, stackArr.length, sendData))
|
|
4757
|
+
// }, 2000);
|
|
4758
|
+
// } else {
|
|
4759
|
+
// reject(result)
|
|
4760
|
+
// }
|
|
4758
4761
|
}
|
|
4759
4762
|
}
|
|
4760
4763
|
});
|
|
@@ -8578,8 +8581,8 @@ function Chat(params) {
|
|
|
8578
8581
|
|
|
8579
8582
|
publicized.checkTURNServer = function (turnIp, port) {
|
|
8580
8583
|
var useUDP = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8581
|
-
var username = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '
|
|
8582
|
-
var password = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '
|
|
8584
|
+
var username = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
8585
|
+
var password = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
|
8583
8586
|
var timeout = arguments.length > 5 ? arguments[5] : undefined;
|
|
8584
8587
|
var url = 'turn:' + turnIp + ':' + port + '?transport=' + (useUDP ? 'udp' : 'tcp');
|
|
8585
8588
|
var turnConfig = {
|
|
@@ -9,10 +9,10 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
13
|
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
|
|
16
16
|
var _callUsers = _interopRequireDefault(require("./callUsers"));
|
|
17
17
|
|
|
18
18
|
var _utility = _interopRequireDefault(require("../../utility/utility"));
|
|
@@ -25,6 +25,8 @@ var _errorHandler = require("../errorHandler");
|
|
|
25
25
|
|
|
26
26
|
var _screenShareStateManager = _interopRequireDefault(require("./screenShareStateManager"));
|
|
27
27
|
|
|
28
|
+
var _messageExecutorQueue = _interopRequireDefault(require("../store/messageExecutorQueue"));
|
|
29
|
+
|
|
28
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
31
|
|
|
30
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -45,8 +47,131 @@ function CallManager(_ref) {
|
|
|
45
47
|
onChatReadyUniqueId: null,
|
|
46
48
|
failedPeersQueue: [],
|
|
47
49
|
inquiryCallCounter: 0,
|
|
48
|
-
isDestroyed: false
|
|
50
|
+
isDestroyed: false,
|
|
51
|
+
ti: atob(callConfig.tInfo).split(":")
|
|
52
|
+
};
|
|
53
|
+
var publicized = {
|
|
54
|
+
processCallMessage: function processCallMessage(message) {
|
|
55
|
+
var uniqueId = message.uniqueId;
|
|
56
|
+
|
|
57
|
+
if (message.done !== 'FALSE' || message.done === 'FALSE' && message.desc === 'duplicated') {
|
|
58
|
+
app.store.asyncRequestTimeouts[uniqueId] && clearTimeout(app.store.asyncRequestTimeouts[uniqueId]);
|
|
59
|
+
} else if (message.done === 'FALSE') {
|
|
60
|
+
app.chatEvents.fireEvent('callEvents', {
|
|
61
|
+
type: 'CALL_ERROR',
|
|
62
|
+
callId: config.callId,
|
|
63
|
+
code: 7000,
|
|
64
|
+
message: "Kurento error: " + (message.desc ? message.desc : message.message),
|
|
65
|
+
environmentDetails: getCallDetails()
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
switch (message.id) {
|
|
70
|
+
case 'PROCESS_SDP_ANSWER':
|
|
71
|
+
handleProcessSdpAnswer(message);
|
|
72
|
+
break;
|
|
73
|
+
|
|
74
|
+
case 'RECEIVING_MEDIA':
|
|
75
|
+
// Only for receiving topics from janus, first we subscribe
|
|
76
|
+
subscribeToReceiveOffers(message);
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 'PROCESS_SDP_OFFER':
|
|
80
|
+
//Then janus sends offers
|
|
81
|
+
handleProcessSdpOffer(message);
|
|
82
|
+
break;
|
|
83
|
+
|
|
84
|
+
case 'ADD_ICE_CANDIDATE':
|
|
85
|
+
handleAddIceCandidate(message);
|
|
86
|
+
break;
|
|
87
|
+
|
|
88
|
+
case 'GET_KEY_FRAME':
|
|
89
|
+
var user = config.users.get(app.store.user.get().id);
|
|
90
|
+
|
|
91
|
+
if (user && user.user().video) {
|
|
92
|
+
user.videoTopicManager().restartMediaOnKeyFrame(app.store.user.get().id, [2000, 4000, 8000, 12000]);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
var screenShareuser = config.users.get('screenShare');
|
|
96
|
+
|
|
97
|
+
if (screenShareuser && screenShareuser.user().video && config.screenShareInfo.isStarted() && config.screenShareInfo.iAmOwner()) {
|
|
98
|
+
screenShareuser.videoTopicManager().restartMediaOnKeyFrame('screenShare', [2000, 4000, 8000, 12000]);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
break;
|
|
102
|
+
|
|
103
|
+
case 'FREEZED':
|
|
104
|
+
handlePartnerFreeze(message);
|
|
105
|
+
break;
|
|
106
|
+
|
|
107
|
+
/*case 'STOPALL':
|
|
108
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
109
|
+
app.store.messagesCallbacks[uniqueId](jsonMessage);
|
|
110
|
+
}
|
|
111
|
+
break;*/
|
|
112
|
+
|
|
113
|
+
case 'STOP':
|
|
114
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
115
|
+
app.store.messagesCallbacks[uniqueId](message);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 'CLOSE':
|
|
121
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
122
|
+
app.store.messagesCallbacks[uniqueId](message);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 'SESSION_NEW_CREATED':
|
|
128
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
129
|
+
app.store.messagesCallbacks[uniqueId](message);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
case 'SESSION_REFRESH':
|
|
135
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
136
|
+
app.store.messagesCallbacks[uniqueId](message);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
break;
|
|
140
|
+
|
|
141
|
+
case 'RECEIVEMETADATA':
|
|
142
|
+
handleReceivedMetaData(message, uniqueId);
|
|
143
|
+
break;
|
|
144
|
+
|
|
145
|
+
case 'ERROR':
|
|
146
|
+
publicized.raiseCallError(app.errorHandler.getFilledErrorObject(_objectSpread(_objectSpread({}, _errorHandler.errorList.CALL_SERVER_ERROR), {}, {
|
|
147
|
+
replacements: [JSON.stringify(message)]
|
|
148
|
+
})), null, true);
|
|
149
|
+
break;
|
|
150
|
+
|
|
151
|
+
case 'SEND_SDP_OFFER':
|
|
152
|
+
case 'RECIVE_SDP_OFFER':
|
|
153
|
+
case 'SDP_ANSWER_RECEIVED':
|
|
154
|
+
break;
|
|
155
|
+
|
|
156
|
+
default:
|
|
157
|
+
console.warn("[SDK][onmessage] Invalid message, id: " + message.id, message); // if (jsonMessage.match(/NOT CREATE SESSION/g)) {
|
|
158
|
+
// if (currentCallParams && Object.keys(currentCallParams)) {
|
|
159
|
+
// //handleCallSocketOpen(currentCallParams);
|
|
160
|
+
// callStateController.createSessionInChat(currentCallParams);
|
|
161
|
+
// }
|
|
162
|
+
// }
|
|
163
|
+
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
app.store.messagesCallbacks[uniqueId] && delete app.store.messagesCallbacks[uniqueId];
|
|
168
|
+
}
|
|
49
169
|
};
|
|
170
|
+
config.callMessageExecutor = new _messageExecutorQueue["default"]({
|
|
171
|
+
app: app,
|
|
172
|
+
executorTimeout: 10,
|
|
173
|
+
callback: publicized.processCallMessage
|
|
174
|
+
});
|
|
50
175
|
|
|
51
176
|
function reconnectFailedPeers() {
|
|
52
177
|
while (config.failedPeersQueue.length) {
|
|
@@ -736,7 +861,7 @@ function CallManager(_ref) {
|
|
|
736
861
|
});
|
|
737
862
|
}
|
|
738
863
|
|
|
739
|
-
|
|
864
|
+
publicized = {
|
|
740
865
|
queueMeForReconnect: function queueMeForReconnect(topic) {
|
|
741
866
|
config.failedPeersQueue.push(topic);
|
|
742
867
|
},
|
|
@@ -785,29 +910,20 @@ function CallManager(_ref) {
|
|
|
785
910
|
if (app.call.sharedVariables.useCustomTurnAddress) {
|
|
786
911
|
return [{
|
|
787
912
|
"urls": "turn:" + app.call.sharedVariables.callTurnIp + ":3478",
|
|
788
|
-
"username":
|
|
789
|
-
"credential":
|
|
913
|
+
"username": config.ti[0],
|
|
914
|
+
"credential": config.ti[1]
|
|
790
915
|
}];
|
|
791
916
|
} else {
|
|
792
917
|
for (var i in serversTemp) {
|
|
793
918
|
turnsList.push({
|
|
794
919
|
"urls": "turn:" + serversTemp[i],
|
|
795
|
-
"username":
|
|
796
|
-
"credential":
|
|
920
|
+
"username": config.ti[0],
|
|
921
|
+
"credential": config.ti[1]
|
|
797
922
|
});
|
|
798
923
|
}
|
|
799
924
|
|
|
800
925
|
return turnsList;
|
|
801
|
-
}
|
|
802
|
-
// return [
|
|
803
|
-
// {
|
|
804
|
-
// "urls": "turn:" + app.call.sharedVariables.callTurnIp + ":3478",
|
|
805
|
-
// "username": "mkhorrami",
|
|
806
|
-
// "credential": "mkh_123456"
|
|
807
|
-
// }
|
|
808
|
-
// ];
|
|
809
|
-
// }
|
|
810
|
-
|
|
926
|
+
}
|
|
811
927
|
},
|
|
812
928
|
sendQualityCheckEvent: function sendQualityCheckEvent(_ref4) {
|
|
813
929
|
var userId = _ref4.userId,
|
|
@@ -859,121 +975,6 @@ function CallManager(_ref) {
|
|
|
859
975
|
});
|
|
860
976
|
}
|
|
861
977
|
},
|
|
862
|
-
processCallMessage: function processCallMessage(message) {
|
|
863
|
-
var uniqueId = message.uniqueId;
|
|
864
|
-
|
|
865
|
-
if (message.done !== 'FALSE' || message.done === 'FALSE' && message.desc === 'duplicated') {
|
|
866
|
-
app.store.asyncRequestTimeouts[uniqueId] && clearTimeout(app.store.asyncRequestTimeouts[uniqueId]);
|
|
867
|
-
} else if (message.done === 'FALSE') {
|
|
868
|
-
app.chatEvents.fireEvent('callEvents', {
|
|
869
|
-
type: 'CALL_ERROR',
|
|
870
|
-
callId: config.callId,
|
|
871
|
-
code: 7000,
|
|
872
|
-
message: "Kurento error: " + (message.desc ? message.desc : message.message),
|
|
873
|
-
environmentDetails: getCallDetails()
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
switch (message.id) {
|
|
878
|
-
case 'PROCESS_SDP_ANSWER':
|
|
879
|
-
handleProcessSdpAnswer(message);
|
|
880
|
-
break;
|
|
881
|
-
|
|
882
|
-
case 'RECEIVING_MEDIA':
|
|
883
|
-
// Only for receiving topics from janus, first we subscribe
|
|
884
|
-
subscribeToReceiveOffers(message);
|
|
885
|
-
break;
|
|
886
|
-
|
|
887
|
-
case 'PROCESS_SDP_OFFER':
|
|
888
|
-
//Then janus sends offers
|
|
889
|
-
handleProcessSdpOffer(message);
|
|
890
|
-
break;
|
|
891
|
-
|
|
892
|
-
case 'ADD_ICE_CANDIDATE':
|
|
893
|
-
handleAddIceCandidate(message);
|
|
894
|
-
break;
|
|
895
|
-
|
|
896
|
-
case 'GET_KEY_FRAME':
|
|
897
|
-
var user = config.users.get(app.store.user.get().id);
|
|
898
|
-
|
|
899
|
-
if (user && user.user().video) {
|
|
900
|
-
user.videoTopicManager().restartMediaOnKeyFrame(app.store.user.get().id, [2000, 4000, 8000, 12000]);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
var screenShareuser = config.users.get('screenShare');
|
|
904
|
-
|
|
905
|
-
if (screenShareuser && screenShareuser.user().video && config.screenShareInfo.isStarted() && config.screenShareInfo.iAmOwner()) {
|
|
906
|
-
screenShareuser.videoTopicManager().restartMediaOnKeyFrame('screenShare', [2000, 4000, 8000, 12000]);
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
break;
|
|
910
|
-
|
|
911
|
-
case 'FREEZED':
|
|
912
|
-
handlePartnerFreeze(message);
|
|
913
|
-
break;
|
|
914
|
-
|
|
915
|
-
/*case 'STOPALL':
|
|
916
|
-
if (app.store.messagesCallbacks[uniqueId]) {
|
|
917
|
-
app.store.messagesCallbacks[uniqueId](jsonMessage);
|
|
918
|
-
}
|
|
919
|
-
break;*/
|
|
920
|
-
|
|
921
|
-
case 'STOP':
|
|
922
|
-
if (app.store.messagesCallbacks[uniqueId]) {
|
|
923
|
-
app.store.messagesCallbacks[uniqueId](message);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
break;
|
|
927
|
-
|
|
928
|
-
case 'CLOSE':
|
|
929
|
-
if (app.store.messagesCallbacks[uniqueId]) {
|
|
930
|
-
app.store.messagesCallbacks[uniqueId](message);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
break;
|
|
934
|
-
|
|
935
|
-
case 'SESSION_NEW_CREATED':
|
|
936
|
-
if (app.store.messagesCallbacks[uniqueId]) {
|
|
937
|
-
app.store.messagesCallbacks[uniqueId](message);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
break;
|
|
941
|
-
|
|
942
|
-
case 'SESSION_REFRESH':
|
|
943
|
-
if (app.store.messagesCallbacks[uniqueId]) {
|
|
944
|
-
app.store.messagesCallbacks[uniqueId](message);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
break;
|
|
948
|
-
|
|
949
|
-
case 'RECEIVEMETADATA':
|
|
950
|
-
handleReceivedMetaData(message, uniqueId);
|
|
951
|
-
break;
|
|
952
|
-
|
|
953
|
-
case 'ERROR':
|
|
954
|
-
publicized.raiseCallError(app.errorHandler.getFilledErrorObject(_objectSpread(_objectSpread({}, _errorHandler.errorList.CALL_SERVER_ERROR), {}, {
|
|
955
|
-
replacements: [JSON.stringify(message)]
|
|
956
|
-
})), null, true);
|
|
957
|
-
break;
|
|
958
|
-
|
|
959
|
-
case 'SEND_SDP_OFFER':
|
|
960
|
-
case 'RECIVE_SDP_OFFER':
|
|
961
|
-
case 'SDP_ANSWER_RECEIVED':
|
|
962
|
-
break;
|
|
963
|
-
|
|
964
|
-
default:
|
|
965
|
-
console.warn("[SDK][onmessage] Invalid message, id: " + message.id, message); // if (jsonMessage.match(/NOT CREATE SESSION/g)) {
|
|
966
|
-
// if (currentCallParams && Object.keys(currentCallParams)) {
|
|
967
|
-
// //handleCallSocketOpen(currentCallParams);
|
|
968
|
-
// callStateController.createSessionInChat(currentCallParams);
|
|
969
|
-
// }
|
|
970
|
-
// }
|
|
971
|
-
|
|
972
|
-
break;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
app.store.messagesCallbacks[uniqueId] && delete app.store.messagesCallbacks[uniqueId];
|
|
976
|
-
},
|
|
977
978
|
handleParticipantJoin: function handleParticipantJoin(messageContent, threadId) {
|
|
978
979
|
if (Array.isArray(messageContent)) {
|
|
979
980
|
var _loop = function _loop(i) {
|
|
@@ -1462,7 +1463,8 @@ function CallManager(_ref) {
|
|
|
1462
1463
|
},
|
|
1463
1464
|
isDestroyed: function isDestroyed() {
|
|
1464
1465
|
return config.isDestroyed;
|
|
1465
|
-
}
|
|
1466
|
+
},
|
|
1467
|
+
callMessageQueue: config.callMessageExecutor
|
|
1466
1468
|
};
|
|
1467
1469
|
setTimeout(function () {
|
|
1468
1470
|
startCallWebRTCFunctions(config.callConfig);
|