vani-meeting-client 1.1.9 → 1.2.0
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 +9 -0
- package/lib/inter-communication-handler/CommunicationHandler.d.ts +1 -0
- package/lib/inter-communication-handler/CommunicationHandler.js +4 -0
- package/lib/video-call-handler/BaseVideoCallHandler.d.ts +2 -1
- package/lib/video-call-handler/BaseVideoCallHandler.js +8 -1
- package/lib/video-call-handler/SFUHandler.d.ts +1 -0
- package/lib/video-call-handler/SFUHandler.js +19 -0
- package/package.json +1 -1
package/lib/MeetingHandler.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare class MeetingHandler {
|
|
|
29
29
|
pauseIncomingTrack(track: Track): void;
|
|
30
30
|
resumeIncomingTrack(track: Track): void;
|
|
31
31
|
updateSpatialForTrack(track: Track, spatialLayerIndex: number): Promise<void>;
|
|
32
|
+
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
32
33
|
participantByUserId(userId: string): Participant | undefined;
|
|
33
34
|
updateParticipantData(participant: Participant): Participant | undefined;
|
|
34
35
|
getUpdatedParticipantsListFromServer(): void;
|
package/lib/MeetingHandler.js
CHANGED
|
@@ -265,6 +265,15 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
265
265
|
});
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
|
+
MeetingHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
269
|
+
var _a;
|
|
270
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
271
|
+
return __generator(this, function (_b) {
|
|
272
|
+
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.resumeProducerOrConsumerForTrack(track);
|
|
273
|
+
return [2 /*return*/];
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
};
|
|
268
277
|
//Participant
|
|
269
278
|
MeetingHandler.prototype.participantByUserId = function (userId) {
|
|
270
279
|
var _a, _b, _c;
|
|
@@ -40,6 +40,7 @@ export declare class CommunicationHandler {
|
|
|
40
40
|
getLocalTrackById(trackId: string): Track | undefined;
|
|
41
41
|
getAllTracksForParticipant(participant: Participant): Track[];
|
|
42
42
|
removeTrack(track: Track, shouldInfromVideoController?: boolean): void;
|
|
43
|
+
resumeProducerOrConsumerForTrack(track: Track): void;
|
|
43
44
|
addUpdateRemoteTrack(track: Track, participant: Participant, shouldInfromIfNotExist?: boolean): Track;
|
|
44
45
|
addUpdateLocalTrack(track: Track): void;
|
|
45
46
|
onOldMessages(data: any): void;
|
|
@@ -234,6 +234,10 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
234
234
|
Utility.deleteArrayObject(track, this.selfTracks);
|
|
235
235
|
this.emitMessageToSource(VaniEvent.OnTrackEnded, track);
|
|
236
236
|
};
|
|
237
|
+
CommunicationHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
238
|
+
var _a;
|
|
239
|
+
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.resumeProducerOrConsumerForTrack(track);
|
|
240
|
+
};
|
|
237
241
|
CommunicationHandler.prototype.addUpdateRemoteTrack = function (track, participant, shouldInfromIfNotExist) {
|
|
238
242
|
if (shouldInfromIfNotExist === void 0) { shouldInfromIfNotExist = false; }
|
|
239
243
|
var oldTrack = this.getTrackById(track.trackId);
|
|
@@ -15,7 +15,8 @@ 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
|
-
|
|
18
|
+
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
19
19
|
reconnectedWithoutPing(): void;
|
|
20
|
+
updateSpatialForTrack(track: Track, spatialLayerIndex: number): Promise<void>;
|
|
20
21
|
cleanup(): void;
|
|
21
22
|
}
|
|
@@ -61,7 +61,7 @@ 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.
|
|
64
|
+
BaseVideoCallHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
66
|
return __generator(this, function (_a) {
|
|
67
67
|
return [2 /*return*/];
|
|
@@ -70,6 +70,13 @@ var BaseVideoCallHandler = /** @class */ (function (_super) {
|
|
|
70
70
|
};
|
|
71
71
|
BaseVideoCallHandler.prototype.reconnectedWithoutPing = function () {
|
|
72
72
|
};
|
|
73
|
+
BaseVideoCallHandler.prototype.updateSpatialForTrack = function (track, spatialLayerIndex) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
+
return __generator(this, function (_a) {
|
|
76
|
+
return [2 /*return*/];
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
73
80
|
BaseVideoCallHandler.prototype.cleanup = function () {
|
|
74
81
|
log.info("cleanup ");
|
|
75
82
|
};
|
|
@@ -20,6 +20,7 @@ export declare class SFUHandler extends BaseVideoCallHandler {
|
|
|
20
20
|
private onRestartIceCandidateResponse;
|
|
21
21
|
stopTrack(track: Track): void;
|
|
22
22
|
pauseTrack(track: Track): void;
|
|
23
|
+
resumeProducerOrConsumerForTrack(track: Track): Promise<void>;
|
|
23
24
|
resumeTrack(track: Track): void;
|
|
24
25
|
pauseIncomingTrack(track: Track): void;
|
|
25
26
|
resumeIncomingTrack(track: Track): void;
|
|
@@ -166,6 +166,25 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
+
SFUHandler.prototype.resumeProducerOrConsumerForTrack = function (track) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
+
var producer, consumer;
|
|
172
|
+
return __generator(this, function (_a) {
|
|
173
|
+
console.log("resumeProducerOrConsumerForTrack");
|
|
174
|
+
producer = this.producers.find(function (producer) { return producer.appData.trackId === track.trackId; });
|
|
175
|
+
if (producer) {
|
|
176
|
+
producer.resume();
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
consumer = this.consumers.find(function (consumer) { return consumer.appData.producerData.trackId === track.trackId; });
|
|
180
|
+
if (consumer) {
|
|
181
|
+
consumer.resume();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return [2 /*return*/];
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
};
|
|
169
188
|
SFUHandler.prototype.resumeTrack = function (track) {
|
|
170
189
|
var producer = this.producers.find(function (producer) { return producer.appData.trackId === track.trackId; });
|
|
171
190
|
if (producer) {
|