vani-meeting-client 1.7.5 → 1.7.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/lib/MeetingHandler.d.ts +1 -0
- package/lib/MeetingHandler.js +7 -0
- package/lib/inter-communication-handler/CommunicationHandler.d.ts +1 -0
- package/lib/inter-communication-handler/CommunicationHandler.js +7 -0
- package/lib/model/MeetingStartRequest.js +1 -1
- package/lib/utility/DynamicLibHelper.js +4 -6
- package/lib/utility/DynamicLibHelper.native.d.ts +8 -0
- package/lib/utility/DynamicLibHelper.native.js +109 -0
- package/lib/utility/DynamicLibHelper.node.d.ts +8 -0
- package/lib/utility/DynamicLibHelper.node.js +108 -0
- package/lib/video-call-handler/BaseVideoCallHandler.d.ts +1 -0
- package/lib/video-call-handler/BaseVideoCallHandler.js +2 -0
- package/lib/video-call-handler/SFUHandler.d.ts +1 -0
- package/lib/video-call-handler/SFUHandler.js +4 -6
- package/lib/websocket-handler/WebsocketHandler.d.ts +1 -0
- package/lib/websocket-handler/WebsocketHandler.js +1 -0
- package/package.json +2 -3
package/lib/MeetingHandler.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export declare class MeetingHandler {
|
|
|
48
48
|
getMeetingStartTime(): Promise<void>;
|
|
49
49
|
startRTMPStream(urls: string[]): Promise<void>;
|
|
50
50
|
getEventEmitter(): VaniEventListener | undefined;
|
|
51
|
+
restartTransport: () => Promise<void>;
|
|
51
52
|
private emitMessageToSource;
|
|
52
53
|
private cleanup;
|
|
53
54
|
private handleGA;
|
package/lib/MeetingHandler.js
CHANGED
|
@@ -50,6 +50,13 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
50
50
|
var _a;
|
|
51
51
|
(_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.requestToCloseTheRoom();
|
|
52
52
|
};
|
|
53
|
+
this.restartTransport = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
54
|
+
var _a;
|
|
55
|
+
return __generator(this, function (_b) {
|
|
56
|
+
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.restartTransport();
|
|
57
|
+
return [2 /*return*/];
|
|
58
|
+
});
|
|
59
|
+
}); };
|
|
53
60
|
}
|
|
54
61
|
MeetingHandler.prototype.meetingStartRequestObject = function (roomId, userId, appId, wssUrl) {
|
|
55
62
|
if (!this.meetingStartRequest) {
|
|
@@ -24,6 +24,7 @@ export declare class CommunicationHandler {
|
|
|
24
24
|
emitMessageToSource(emitType: VaniEvent, payload: any): Promise<void>;
|
|
25
25
|
getEventEmitter(): VaniEventListener;
|
|
26
26
|
onAudioVideoStatusUpdated(data: any): void;
|
|
27
|
+
restartTransport: () => Promise<void>;
|
|
27
28
|
getSelfParticipant(): Participant | undefined;
|
|
28
29
|
downloadParticipantsData(): void;
|
|
29
30
|
onServerParticipants(data: any): void;
|
|
@@ -50,6 +50,13 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
50
50
|
this.selfTracks = [];
|
|
51
51
|
this.allTracks = [];
|
|
52
52
|
this.isReachable = true;
|
|
53
|
+
this.restartTransport = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
54
|
+
var _a;
|
|
55
|
+
return __generator(this, function (_b) {
|
|
56
|
+
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.restartTransport();
|
|
57
|
+
return [2 /*return*/];
|
|
58
|
+
});
|
|
59
|
+
}); };
|
|
53
60
|
this.requestToCloseTheRoom = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
54
61
|
var _a;
|
|
55
62
|
return __generator(this, function (_b) {
|
|
@@ -47,7 +47,7 @@ var MeetingStartRequest = /** @class */ (function () {
|
|
|
47
47
|
this.connectionProtocol = ConnectionProtocol.UDP;
|
|
48
48
|
this.shouldKeepTryToReconnect = false;
|
|
49
49
|
this.urlToCheckInternetPresent = "https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Stack%20Overflow";
|
|
50
|
-
this.roomId = _roomId.
|
|
50
|
+
this.roomId = _roomId.toUpperCase();
|
|
51
51
|
this.userId = _userId;
|
|
52
52
|
this.appId = _appId;
|
|
53
53
|
if (_wssUrl.indexOf("connection=") < 0) {
|
|
@@ -41,13 +41,11 @@ var DynamicLibHelper = /** @class */ (function () {
|
|
|
41
41
|
}
|
|
42
42
|
DynamicLibHelper.prototype.getReactNativeWebrtcPlugin = function (meetingStartRequest) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
-
var optionalRequire, libName;
|
|
45
44
|
return __generator(this, function (_a) {
|
|
46
45
|
try {
|
|
47
46
|
if (meetingStartRequest.isMobileApp) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return [2 /*return*/, optionalRequire(libName)];
|
|
47
|
+
// const libName = 'react-native-webrtc'
|
|
48
|
+
// return (require(libName));
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
catch (_b) {
|
|
@@ -86,7 +84,7 @@ var DynamicLibHelper = /** @class */ (function () {
|
|
|
86
84
|
DynamicLibHelper.prototype.getMediaDevicesVariable = function (meetingStartRequest) {
|
|
87
85
|
try {
|
|
88
86
|
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
89
|
-
return require("react-native-webrtc").mediaDevices;
|
|
87
|
+
// return require("react-native-webrtc").mediaDevices;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
catch (err) {
|
|
@@ -97,7 +95,7 @@ var DynamicLibHelper = /** @class */ (function () {
|
|
|
97
95
|
DynamicLibHelper.prototype.getMediaStreamVariable = function (meetingStartRequest) {
|
|
98
96
|
try {
|
|
99
97
|
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
100
|
-
return require("react-native-webrtc").MediaStream;
|
|
98
|
+
// return require("react-native-webrtc").MediaStream;
|
|
101
99
|
}
|
|
102
100
|
}
|
|
103
101
|
catch (err) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MeetingStartRequest, MeetingType } from '..';
|
|
2
|
+
import { CommunicationHandler } from '../inter-communication-handler/CommunicationHandler';
|
|
3
|
+
export declare class DynamicLibHelper {
|
|
4
|
+
getReactNativeWebrtcPlugin(meetingStartRequest: MeetingStartRequest): Promise<any>;
|
|
5
|
+
getVideoCallClassHandler(meetingType: MeetingType, meetingStartRequest: MeetingStartRequest, _communicationHandler: CommunicationHandler): Promise<import("../video-call-handler/SFUHandler").SFUHandler | import("../video-call-handler/WebrtcHandler").WebrtcHandler | undefined>;
|
|
6
|
+
getMediaDevicesVariable(meetingStartRequest: MeetingStartRequest): any;
|
|
7
|
+
getMediaStreamVariable(meetingStartRequest: MeetingStartRequest): any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { MeetingType } from '..';
|
|
38
|
+
import * as log from 'loglevel';
|
|
39
|
+
var DynamicLibHelper = /** @class */ (function () {
|
|
40
|
+
function DynamicLibHelper() {
|
|
41
|
+
}
|
|
42
|
+
DynamicLibHelper.prototype.getReactNativeWebrtcPlugin = function (meetingStartRequest) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
+
var libName;
|
|
45
|
+
return __generator(this, function (_a) {
|
|
46
|
+
try {
|
|
47
|
+
if (meetingStartRequest.isMobileApp) {
|
|
48
|
+
libName = 'react-native-webrtc';
|
|
49
|
+
return [2 /*return*/, (require(libName))];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (_b) {
|
|
53
|
+
log.error("react-native-webrtc not found");
|
|
54
|
+
return [2 /*return*/, undefined];
|
|
55
|
+
}
|
|
56
|
+
return [2 /*return*/];
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
DynamicLibHelper.prototype.getVideoCallClassHandler = function (meetingType, meetingStartRequest, _communicationHandler) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
+
var baseVideoCallHandler, baseVideoCallHandler;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
switch (_a.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
if (!(meetingType === MeetingType.SFU)) return [3 /*break*/, 2];
|
|
67
|
+
return [4 /*yield*/, import("../video-call-handler/SFUHandler")];
|
|
68
|
+
case 1:
|
|
69
|
+
baseVideoCallHandler = _a.sent();
|
|
70
|
+
if (baseVideoCallHandler) {
|
|
71
|
+
return [2 /*return*/, new baseVideoCallHandler.SFUHandler(meetingStartRequest, _communicationHandler)];
|
|
72
|
+
}
|
|
73
|
+
_a.label = 2;
|
|
74
|
+
case 2:
|
|
75
|
+
if (!(meetingType === MeetingType.WEBRTC)) return [3 /*break*/, 4];
|
|
76
|
+
baseVideoCallHandler = import("../video-call-handler/WebrtcHandler");
|
|
77
|
+
if (!baseVideoCallHandler) return [3 /*break*/, 4];
|
|
78
|
+
return [4 /*yield*/, baseVideoCallHandler];
|
|
79
|
+
case 3: return [2 /*return*/, new (_a.sent()).WebrtcHandler(meetingStartRequest, _communicationHandler)];
|
|
80
|
+
case 4: return [2 /*return*/, undefined];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
DynamicLibHelper.prototype.getMediaDevicesVariable = function (meetingStartRequest) {
|
|
86
|
+
try {
|
|
87
|
+
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
88
|
+
return require("react-native-webrtc").mediaDevices;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
log.error("react-native-webrtc not found. Please do npm install ");
|
|
93
|
+
}
|
|
94
|
+
return navigator.mediaDevices;
|
|
95
|
+
};
|
|
96
|
+
DynamicLibHelper.prototype.getMediaStreamVariable = function (meetingStartRequest) {
|
|
97
|
+
try {
|
|
98
|
+
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
99
|
+
return require("react-native-webrtc").MediaStream;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
log.error("react-native-webrtc not found. Please do npm install ");
|
|
104
|
+
}
|
|
105
|
+
return MediaStream;
|
|
106
|
+
};
|
|
107
|
+
return DynamicLibHelper;
|
|
108
|
+
}());
|
|
109
|
+
export { DynamicLibHelper };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MeetingStartRequest, MeetingType } from '..';
|
|
2
|
+
import { CommunicationHandler } from '../inter-communication-handler/CommunicationHandler';
|
|
3
|
+
export declare class DynamicLibHelper {
|
|
4
|
+
getReactNativeWebrtcPlugin(meetingStartRequest: MeetingStartRequest): Promise<any>;
|
|
5
|
+
getVideoCallClassHandler(meetingType: MeetingType, meetingStartRequest: MeetingStartRequest, _communicationHandler: CommunicationHandler): Promise<import("../video-call-handler/SFUHandler").SFUHandler | import("../video-call-handler/WebrtcHandler").WebrtcHandler | undefined>;
|
|
6
|
+
getMediaDevicesVariable(meetingStartRequest: MeetingStartRequest): any;
|
|
7
|
+
getMediaStreamVariable(meetingStartRequest: MeetingStartRequest): any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { MeetingType } from '..';
|
|
38
|
+
import * as log from 'loglevel';
|
|
39
|
+
var DynamicLibHelper = /** @class */ (function () {
|
|
40
|
+
function DynamicLibHelper() {
|
|
41
|
+
}
|
|
42
|
+
DynamicLibHelper.prototype.getReactNativeWebrtcPlugin = function (meetingStartRequest) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
try {
|
|
46
|
+
if (meetingStartRequest.isMobileApp) {
|
|
47
|
+
// const libName = 'react-native-webrtc'
|
|
48
|
+
// return (require(libName));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (_b) {
|
|
52
|
+
log.error("react-native-webrtc not found");
|
|
53
|
+
return [2 /*return*/, undefined];
|
|
54
|
+
}
|
|
55
|
+
return [2 /*return*/];
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
DynamicLibHelper.prototype.getVideoCallClassHandler = function (meetingType, meetingStartRequest, _communicationHandler) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
var baseVideoCallHandler, baseVideoCallHandler;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0:
|
|
65
|
+
if (!(meetingType === MeetingType.SFU)) return [3 /*break*/, 2];
|
|
66
|
+
return [4 /*yield*/, import("../video-call-handler/SFUHandler")];
|
|
67
|
+
case 1:
|
|
68
|
+
baseVideoCallHandler = _a.sent();
|
|
69
|
+
if (baseVideoCallHandler) {
|
|
70
|
+
return [2 /*return*/, new baseVideoCallHandler.SFUHandler(meetingStartRequest, _communicationHandler)];
|
|
71
|
+
}
|
|
72
|
+
_a.label = 2;
|
|
73
|
+
case 2:
|
|
74
|
+
if (!(meetingType === MeetingType.WEBRTC)) return [3 /*break*/, 4];
|
|
75
|
+
baseVideoCallHandler = import("../video-call-handler/WebrtcHandler");
|
|
76
|
+
if (!baseVideoCallHandler) return [3 /*break*/, 4];
|
|
77
|
+
return [4 /*yield*/, baseVideoCallHandler];
|
|
78
|
+
case 3: return [2 /*return*/, new (_a.sent()).WebrtcHandler(meetingStartRequest, _communicationHandler)];
|
|
79
|
+
case 4: return [2 /*return*/, undefined];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
DynamicLibHelper.prototype.getMediaDevicesVariable = function (meetingStartRequest) {
|
|
85
|
+
try {
|
|
86
|
+
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
87
|
+
// return require("react-native-webrtc").mediaDevices;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
log.error("react-native-webrtc not found. Please do npm install ");
|
|
92
|
+
}
|
|
93
|
+
return navigator.mediaDevices;
|
|
94
|
+
};
|
|
95
|
+
DynamicLibHelper.prototype.getMediaStreamVariable = function (meetingStartRequest) {
|
|
96
|
+
try {
|
|
97
|
+
if (meetingStartRequest === null || meetingStartRequest === void 0 ? void 0 : meetingStartRequest.isMobileApp) {
|
|
98
|
+
// return require("react-native-webrtc").MediaStream;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
log.error("react-native-webrtc not found. Please do npm install ");
|
|
103
|
+
}
|
|
104
|
+
return MediaStream;
|
|
105
|
+
};
|
|
106
|
+
return DynamicLibHelper;
|
|
107
|
+
}());
|
|
108
|
+
export { DynamicLibHelper };
|
|
@@ -90,6 +90,8 @@ var BaseVideoCallHandler = /** @class */ (function (_super) {
|
|
|
90
90
|
BaseVideoCallHandler.prototype.cleanup = function () {
|
|
91
91
|
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("cleanup ");
|
|
92
92
|
};
|
|
93
|
+
BaseVideoCallHandler.prototype.restartTransport = function () {
|
|
94
|
+
};
|
|
93
95
|
return BaseVideoCallHandler;
|
|
94
96
|
}(Base));
|
|
95
97
|
export { BaseVideoCallHandler };
|
|
@@ -34,6 +34,7 @@ export declare class SFUHandler extends BaseVideoCallHandler {
|
|
|
34
34
|
sendMessageViaDataChannel(messagePayload: any): void;
|
|
35
35
|
init(): Promise<void>;
|
|
36
36
|
private onTransportNotFound;
|
|
37
|
+
restartTransport(): void;
|
|
37
38
|
private addObserverForDevice;
|
|
38
39
|
private onAllProducers;
|
|
39
40
|
private onRouterRtpCapabilities;
|
|
@@ -408,11 +408,6 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
408
408
|
for (_i = 0, _b = this.producers; _i < _b.length; _i++) {
|
|
409
409
|
producer = _b[_i];
|
|
410
410
|
if (producer) {
|
|
411
|
-
// try {
|
|
412
|
-
// producer.track?.stop()
|
|
413
|
-
// }
|
|
414
|
-
// catch (err) {
|
|
415
|
-
// }
|
|
416
411
|
producer.close();
|
|
417
412
|
}
|
|
418
413
|
}
|
|
@@ -438,12 +433,15 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
438
433
|
this.sendTransport = undefined;
|
|
439
434
|
}
|
|
440
435
|
this.isProduceTrackIntialWorkDone = false;
|
|
441
|
-
messageJson = { to: "self", type: SFUMessageType.
|
|
436
|
+
messageJson = { to: "self", type: SFUMessageType.OnCreateTransportsForcefully, message: SFUMessageType.OnCreateTransportsForcefully };
|
|
442
437
|
this.sendSFUMessageToSocket(messageJson);
|
|
443
438
|
return [2 /*return*/];
|
|
444
439
|
});
|
|
445
440
|
});
|
|
446
441
|
};
|
|
442
|
+
SFUHandler.prototype.restartTransport = function () {
|
|
443
|
+
this.onTransportNotFound(undefined);
|
|
444
|
+
};
|
|
447
445
|
SFUHandler.prototype.addObserverForDevice = function () {
|
|
448
446
|
return __awaiter(this, void 0, void 0, function () {
|
|
449
447
|
var _this = this;
|
|
@@ -58,6 +58,7 @@ export declare enum SFUMessageType {
|
|
|
58
58
|
UpdateSpatialConsumer = "updateSpatialConsumer",
|
|
59
59
|
OnRestartIceCandidateResponse = "onRestartIceCandidate",
|
|
60
60
|
OnTransportNotFound = "onTransportNotFound",
|
|
61
|
+
OnCreateTransportsForcefully = "OnCreateTransportsForcefully",
|
|
61
62
|
GetAllProducers = "getAllProducers",
|
|
62
63
|
OnAllProducers = "onAllProducers",
|
|
63
64
|
OnAudioVolumeChanged = "OnAudioVolumeChanged",
|
|
@@ -114,6 +114,7 @@ export var SFUMessageType;
|
|
|
114
114
|
SFUMessageType["UpdateSpatialConsumer"] = "updateSpatialConsumer";
|
|
115
115
|
SFUMessageType["OnRestartIceCandidateResponse"] = "onRestartIceCandidate";
|
|
116
116
|
SFUMessageType["OnTransportNotFound"] = "onTransportNotFound";
|
|
117
|
+
SFUMessageType["OnCreateTransportsForcefully"] = "OnCreateTransportsForcefully";
|
|
117
118
|
SFUMessageType["GetAllProducers"] = "getAllProducers";
|
|
118
119
|
SFUMessageType["OnAllProducers"] = "onAllProducers";
|
|
119
120
|
SFUMessageType["OnAudioVolumeChanged"] = "OnAudioVolumeChanged";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vani-meeting-client",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "Vani Meeting Clinet SDK",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
-
"build": "tsc",
|
|
12
|
+
"build": "cp ./src/utility/DynamicLibHelper.node.ts ./src/utility/DynamicLibHelper.ts && tsc",
|
|
13
13
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
14
14
|
"lint": "tslint -p tsconfig.json",
|
|
15
15
|
"prepare": "npm run build",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"axios": "^0.24.0",
|
|
48
48
|
"loglevel": "^1.8.0",
|
|
49
49
|
"mediasoup-client": "^3.7.16",
|
|
50
|
-
"optional-require": "^1.1.8",
|
|
51
50
|
"react-native-google-analytics-bridge": "^7.1.0"
|
|
52
51
|
},
|
|
53
52
|
"optionalDependencies": {}
|