vani-meeting-client 1.2.7 → 1.2.8
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 +5 -1
- package/lib/inter-communication-handler/CommunicationHandler.d.ts +1 -0
- package/lib/inter-communication-handler/CommunicationHandler.js +5 -1
- package/lib/user-media-handler/UserMediaHandler.js +1 -1
- package/lib/utility/DynamicLibHelper.js +1 -1
- package/lib/video-call-handler/BaseVideoCallHandler.d.ts +1 -0
- package/lib/video-call-handler/BaseVideoCallHandler.js +3 -1
- package/lib/video-call-handler/SFUHandler.d.ts +2 -0
- package/lib/video-call-handler/SFUHandler.js +8 -4
- package/lib/video-call-handler/WebrtcHandler.js +1 -1
- package/lib/websocket-handler/WebsocketHandler.d.ts +1 -1
- package/lib/websocket-handler/WebsocketHandler.js +1 -1
- package/package.json +4 -4
package/lib/MeetingHandler.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare class MeetingHandler {
|
|
|
30
30
|
resumeIncomingTrack(track: Track): void;
|
|
31
31
|
updateSpatialForTrack(track: Track, spatialLayerIndex: number): Promise<void>;
|
|
32
32
|
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
33
|
+
getConsumerForTrack(track: Track): void | undefined;
|
|
33
34
|
participantByUserId(userId: string): Participant | undefined;
|
|
34
35
|
updateParticipantData(participant: Participant): Participant | undefined;
|
|
35
36
|
getUpdatedParticipantsListFromServer(): void;
|
package/lib/MeetingHandler.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
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
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -274,6 +274,10 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
274
274
|
});
|
|
275
275
|
});
|
|
276
276
|
};
|
|
277
|
+
MeetingHandler.prototype.getConsumerForTrack = function (track) {
|
|
278
|
+
var _a;
|
|
279
|
+
return (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getConsumerForTrack(track);
|
|
280
|
+
};
|
|
277
281
|
//Participant
|
|
278
282
|
MeetingHandler.prototype.participantByUserId = function (userId) {
|
|
279
283
|
var _a, _b, _c;
|
|
@@ -41,6 +41,7 @@ export declare class CommunicationHandler {
|
|
|
41
41
|
getAllTracksForParticipant(participant: Participant): Track[];
|
|
42
42
|
removeTrack(track: Track, shouldInfromVideoController?: boolean): void;
|
|
43
43
|
resumeProducerOrConsumerForTrack(track: Track): void;
|
|
44
|
+
getConsumerForTrack(track: Track): void | undefined;
|
|
44
45
|
addUpdateRemoteTrack(track: Track, participant: Participant, shouldInfromIfNotExist?: boolean): Track;
|
|
45
46
|
addUpdateLocalTrack(track: Track): void;
|
|
46
47
|
onOldMessages(data: any): void;
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
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
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -272,6 +272,10 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
272
272
|
var _a;
|
|
273
273
|
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.resumeProducerOrConsumerForTrack(track);
|
|
274
274
|
};
|
|
275
|
+
CommunicationHandler.prototype.getConsumerForTrack = function (track) {
|
|
276
|
+
var _a;
|
|
277
|
+
return (_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.getConsumerForTrack(track);
|
|
278
|
+
};
|
|
275
279
|
CommunicationHandler.prototype.addUpdateRemoteTrack = function (track, participant, shouldInfromIfNotExist) {
|
|
276
280
|
if (shouldInfromIfNotExist === void 0) { shouldInfromIfNotExist = false; }
|
|
277
281
|
var oldTrack = this.getTrackById(track.trackId);
|
|
@@ -28,7 +28,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28
28
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
29
|
function step(op) {
|
|
30
30
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
32
|
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;
|
|
33
33
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
34
|
switch (op[0]) {
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
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
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -15,6 +15,7 @@ export declare abstract class BaseVideoCallHandler extends Base {
|
|
|
15
15
|
abstract onParticipantUpdated(): void;
|
|
16
16
|
abstract createDataChannel(): any;
|
|
17
17
|
abstract sendMessageViaDataChannel(messagePayload: any): any;
|
|
18
|
+
getConsumerForTrack(track: Track): void;
|
|
18
19
|
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
19
20
|
reconnectedWithoutPing(): void;
|
|
20
21
|
updateSpatialForTrack(track: Track, spatialLayerIndex: number): Promise<void>;
|
|
@@ -28,7 +28,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28
28
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
29
|
function step(op) {
|
|
30
30
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
32
|
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;
|
|
33
33
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
34
|
switch (op[0]) {
|
|
@@ -61,6 +61,8 @@ var BaseVideoCallHandler = /** @class */ (function (_super) {
|
|
|
61
61
|
_super.prototype.onObjectCreated.call(this);
|
|
62
62
|
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.setVideoCallHandler(this);
|
|
63
63
|
};
|
|
64
|
+
BaseVideoCallHandler.prototype.getConsumerForTrack = function (track) {
|
|
65
|
+
};
|
|
64
66
|
BaseVideoCallHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
65
67
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
68
|
return __generator(this, function (_a) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseVideoCallHandler } from "./BaseVideoCallHandler";
|
|
2
2
|
import { WebSocketMessageBody } from "../websocket-handler/WebsocketHandler";
|
|
3
3
|
import { Track } from "../model/Track";
|
|
4
|
+
import { Consumer } from "mediasoup-client/lib/Consumer";
|
|
4
5
|
import { MeetingStartRequest } from '..';
|
|
5
6
|
import { CommunicationHandler } from '../inter-communication-handler/CommunicationHandler';
|
|
6
7
|
export declare class SFUHandler extends BaseVideoCallHandler {
|
|
@@ -20,6 +21,7 @@ export declare class SFUHandler extends BaseVideoCallHandler {
|
|
|
20
21
|
private onRestartIceCandidateResponse;
|
|
21
22
|
stopTrack(track: Track): void;
|
|
22
23
|
pauseTrack(track: Track): void;
|
|
24
|
+
getConsumerForTrack(track: Track): Consumer | undefined;
|
|
23
25
|
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
24
26
|
resumeTrack(track: Track): void;
|
|
25
27
|
pauseIncomingTrack(track: Track): void;
|
|
@@ -39,7 +39,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
39
39
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
40
|
function step(op) {
|
|
41
41
|
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
-
while (_) try {
|
|
42
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
43
|
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;
|
|
44
44
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
45
|
switch (op[0]) {
|
|
@@ -169,6 +169,10 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
+
SFUHandler.prototype.getConsumerForTrack = function (track) {
|
|
173
|
+
var consumer = this.consumers.find(function (consumer) { return consumer.appData.producerData.trackId === track.trackId; });
|
|
174
|
+
return consumer;
|
|
175
|
+
};
|
|
172
176
|
SFUHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
173
177
|
return __awaiter(this, void 0, void 0, function () {
|
|
174
178
|
var producer, consumer;
|
|
@@ -372,11 +376,11 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
372
376
|
var _this = this;
|
|
373
377
|
return __generator(this, function (_a) {
|
|
374
378
|
this.device.observer.on("newtransport", function (transport) {
|
|
375
|
-
transport.on("connect", function (
|
|
379
|
+
transport.on("connect", function (dtlsParameters, _callback, errback) { return __awaiter(_this, void 0, void 0, function () {
|
|
376
380
|
var messageJson;
|
|
377
381
|
return __generator(this, function (_a) {
|
|
378
382
|
this.transportCallBacks[transport.id] = _callback;
|
|
379
|
-
messageJson = { to: "self", type: SFUMessageType.OnTransportConnect, message: { type: transport.appData.type, transportId: transport.id, dtlsParameters:
|
|
383
|
+
messageJson = { to: "self", type: SFUMessageType.OnTransportConnect, message: { type: transport.appData.type, transportId: transport.id, dtlsParameters: dtlsParameters } };
|
|
380
384
|
this.sendSFUMessageToSocket(messageJson);
|
|
381
385
|
return [2 /*return*/];
|
|
382
386
|
});
|
|
@@ -613,7 +617,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
613
617
|
consumerObj = data.message.consumer;
|
|
614
618
|
this.consumerTransport.consumeData(consumerObj).then(function (consumer) {
|
|
615
619
|
_this.dataConsumer.push(consumer);
|
|
616
|
-
consumer.on("message", function (message
|
|
620
|
+
consumer.on("message", function (message) {
|
|
617
621
|
var _a;
|
|
618
622
|
message = JSON.parse(message);
|
|
619
623
|
if (message && message.message) {
|
|
@@ -28,7 +28,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28
28
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
29
|
function step(op) {
|
|
30
30
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
32
|
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;
|
|
33
33
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
34
|
switch (op[0]) {
|
|
@@ -60,7 +60,7 @@ export declare enum SFUMessageType {
|
|
|
60
60
|
GetAllProducers = "getAllProducers",
|
|
61
61
|
OnAllProducers = "onAllProducers"
|
|
62
62
|
}
|
|
63
|
-
export
|
|
63
|
+
export type WebSocketEvents = SFUMessageType | WebSocketBasicEvents;
|
|
64
64
|
export interface WebSocketMessageBody {
|
|
65
65
|
type?: WebSocketEvents;
|
|
66
66
|
data?: any;
|
|
@@ -28,7 +28,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28
28
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
29
|
function step(op) {
|
|
30
30
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
32
|
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;
|
|
33
33
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
34
|
switch (op[0]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vani-meeting-client",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Vani Meeting Clinet SDK",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://vanimeetings.com/",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^18.14.4",
|
|
39
|
+
|
|
39
40
|
"prettier": "^2.5.0",
|
|
40
41
|
"tslint": "^6.1.3",
|
|
41
42
|
"tslint-config-prettier": "^1.18.0",
|
|
@@ -48,6 +49,5 @@
|
|
|
48
49
|
"loglevel": "^1.8.0",
|
|
49
50
|
"mediasoup-client": "^3.6.68",
|
|
50
51
|
"react-native-google-analytics-bridge": "^7.1.0"
|
|
51
|
-
}
|
|
52
|
-
"optionalDependencies": {}
|
|
52
|
+
}
|
|
53
53
|
}
|