vani-meeting-client-native 0.3.0 → 0.3.2
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.
|
@@ -53,7 +53,7 @@ export declare class CommunicationHandler {
|
|
|
53
53
|
onMessage(message: any, shouldInfromSource?: boolean): MessagePayload;
|
|
54
54
|
sendWebSocketMessage(type: WebSocketEvents, data: any): void;
|
|
55
55
|
onVideoCallWebSocketMessage(websocketMessage: WebSocketMessageBody): Promise<void>;
|
|
56
|
-
onReconnect(): Promise<void>;
|
|
56
|
+
onReconnect(shouldInfromVideoCallHandler?: boolean): Promise<void>;
|
|
57
57
|
onStartMeeingCalled(): boolean;
|
|
58
58
|
onAudioBlocked(data: any): void;
|
|
59
59
|
onAudioUnblocked(data: any): void;
|
|
@@ -231,7 +231,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
231
231
|
CommunicationHandler.prototype.onServerParticipants = function (data) {
|
|
232
232
|
var _this = this;
|
|
233
233
|
var _a;
|
|
234
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
234
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
235
235
|
if (data && data.message) {
|
|
236
236
|
var userIds = "";
|
|
237
237
|
Object.entries(data.message).forEach(function (_a) {
|
|
@@ -388,11 +388,11 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
388
388
|
if (shouldInfromIfNotExist === void 0) { shouldInfromIfNotExist = false; }
|
|
389
389
|
var oldTrack = this.getTrackById(track.trackId);
|
|
390
390
|
if (oldTrack) {
|
|
391
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
391
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("oldtrack found");
|
|
392
392
|
track = Object.assign(oldTrack, track);
|
|
393
393
|
}
|
|
394
394
|
else {
|
|
395
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
395
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("new track found");
|
|
396
396
|
track = Object.assign(new Track(participant, track.isLocalTrack, track.trackKind, track.track), track);
|
|
397
397
|
this.allTracks.push(track);
|
|
398
398
|
}
|
|
@@ -404,7 +404,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
404
404
|
track.participant.isVideoEnable = true;
|
|
405
405
|
}
|
|
406
406
|
if (shouldInfromIfNotExist) {
|
|
407
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
407
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("emitMessageToSource");
|
|
408
408
|
this.emitMessageToSource(VaniEvent.OnTrack, track);
|
|
409
409
|
}
|
|
410
410
|
return track;
|
|
@@ -430,6 +430,9 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
430
430
|
else if (track.trackKind === TrackKind.Video) {
|
|
431
431
|
track.participant.isVideoEnable = true;
|
|
432
432
|
}
|
|
433
|
+
if (!this.videoCallHandler) {
|
|
434
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("No Video Handler While Sending Track");
|
|
435
|
+
}
|
|
433
436
|
if (this.isStartAndSetupWithServerCalled) {
|
|
434
437
|
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.sendTrack(track);
|
|
435
438
|
}
|
|
@@ -492,11 +495,14 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
492
495
|
});
|
|
493
496
|
});
|
|
494
497
|
};
|
|
495
|
-
CommunicationHandler.prototype.onReconnect = function () {
|
|
498
|
+
CommunicationHandler.prototype.onReconnect = function (shouldInfromVideoCallHandler) {
|
|
496
499
|
var _a;
|
|
500
|
+
if (shouldInfromVideoCallHandler === void 0) { shouldInfromVideoCallHandler = true; }
|
|
497
501
|
return __awaiter(this, void 0, void 0, function () {
|
|
498
502
|
return __generator(this, function (_b) {
|
|
499
|
-
(
|
|
503
|
+
if (shouldInfromVideoCallHandler) {
|
|
504
|
+
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.onReconnect();
|
|
505
|
+
}
|
|
500
506
|
this.emitMessageToSource(VaniEvent.OnConnectionBack, {});
|
|
501
507
|
return [2 /*return*/];
|
|
502
508
|
});
|
|
@@ -519,7 +525,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
519
525
|
log.warn("WEB SOCKET NOT CONNECTED");
|
|
520
526
|
return false;
|
|
521
527
|
}
|
|
522
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
528
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onStartAndSetupWithServerCalled");
|
|
523
529
|
this.isStartAndSetupWithServerCalled = true;
|
|
524
530
|
var data = { user: (_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.userId };
|
|
525
531
|
var startMeetingCalled = { message: data, type: WebSocketBasicEvents.OnStartMeetingCalled, to: (_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.roomId };
|
|
@@ -532,7 +538,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
532
538
|
};
|
|
533
539
|
CommunicationHandler.prototype.onAudioBlocked = function (data) {
|
|
534
540
|
var _a, _b, _c;
|
|
535
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
541
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
536
542
|
if (data.message.user) {
|
|
537
543
|
var participant = this.participantByUserId(data.message.user);
|
|
538
544
|
if (participant) {
|
|
@@ -545,7 +551,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
545
551
|
}
|
|
546
552
|
};
|
|
547
553
|
CommunicationHandler.prototype.onAudioUnblocked = function (data) {
|
|
548
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
554
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
549
555
|
if (data.message.user) {
|
|
550
556
|
var participant = this.participantByUserId(data.message.user);
|
|
551
557
|
if (participant) {
|
|
@@ -556,7 +562,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
556
562
|
};
|
|
557
563
|
CommunicationHandler.prototype.onVideoBlocked = function (data) {
|
|
558
564
|
var _a, _b, _c;
|
|
559
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
565
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
560
566
|
if (data.message.user) {
|
|
561
567
|
var participant = this.participantByUserId(data.message.user);
|
|
562
568
|
if (participant) {
|
|
@@ -569,7 +575,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
569
575
|
}
|
|
570
576
|
};
|
|
571
577
|
CommunicationHandler.prototype.onVideoUnblocked = function (data) {
|
|
572
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
578
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
573
579
|
if (data.message.user) {
|
|
574
580
|
var participant = this.participantByUserId(data.message.user);
|
|
575
581
|
if (participant) {
|
|
@@ -308,7 +308,7 @@ var UserMediaHandler = /** @class */ (function (_super) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
311
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(userMediaPayload);
|
|
312
312
|
(new DynamicLibHelper()).getMediaDevicesVariable(this.meetingStartRequest).getUserMedia(userMediaPayload)
|
|
313
313
|
.then(function (stream) {
|
|
314
314
|
_this.onStreamGot(stream, isAudioRequired, isVideoRequired, shouldAddTrackImmediately);
|
|
@@ -463,6 +463,9 @@ var UserMediaHandler = /** @class */ (function (_super) {
|
|
|
463
463
|
(_c = this.communicationHandler) === null || _c === void 0 ? void 0 : _c.addUpdateLocalTrack(track);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
+
else {
|
|
467
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onTrack no Self Participant");
|
|
468
|
+
}
|
|
466
469
|
}
|
|
467
470
|
catch (err) { }
|
|
468
471
|
};
|
|
@@ -60,7 +60,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
60
60
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
import log from 'loglevel';
|
|
64
63
|
import { BaseVideoCallHandler } from "./BaseVideoCallHandler";
|
|
65
64
|
import { detectDevice, Device } from 'mediasoup-client';
|
|
66
65
|
import { SFUMessageType } from "../websocket-handler/WebsocketHandler";
|
|
@@ -120,7 +119,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
120
119
|
var _a, _b;
|
|
121
120
|
return __generator(this, function (_c) {
|
|
122
121
|
data = _data.message;
|
|
123
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
122
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onConsumerScoreChange", data);
|
|
124
123
|
score = data.score;
|
|
125
124
|
consumerId = data.consumerId;
|
|
126
125
|
consumedProducer = this.consumers.find(function (eachConsumer) { return eachConsumer.id === consumerId; });
|
|
@@ -136,7 +135,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
136
135
|
var _a, _b, _c, _d;
|
|
137
136
|
return __generator(this, function (_e) {
|
|
138
137
|
data = _data.message;
|
|
139
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
138
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onProducerScoreChange", data);
|
|
140
139
|
score = data.score;
|
|
141
140
|
producerId = data.producerId;
|
|
142
141
|
producer = this.producers.find(function (producer) { return producer.id === producerId; });
|
|
@@ -159,7 +158,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
159
158
|
var _a, _b;
|
|
160
159
|
return __generator(this, function (_c) {
|
|
161
160
|
data = _data.message;
|
|
162
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
161
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onConsumerLayerChange", data);
|
|
163
162
|
layer = data.layer;
|
|
164
163
|
consumerId = data.consumerId;
|
|
165
164
|
consumer = this.consumers.find(function (consumer) { return consumer.id === consumerId; });
|
|
@@ -235,7 +234,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
235
234
|
return __awaiter(this, void 0, void 0, function () {
|
|
236
235
|
var data, data;
|
|
237
236
|
return __generator(this, function (_a) {
|
|
238
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
237
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("SFU onReconnect");
|
|
239
238
|
if (this.sendTransport &&
|
|
240
239
|
(this.sendTransport.connectionState === "disconnected" || this.sendTransport.connectionState === "failed" || this.sendTransport.connectionState === "new")) {
|
|
241
240
|
data = { to: "self", message: { transportId: this.sendTransport.id }, "type": SFUMessageType.OnRestartIceCandidate };
|
|
@@ -274,7 +273,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
274
273
|
_b.sent();
|
|
275
274
|
_b.label = 4;
|
|
276
275
|
case 4:
|
|
277
|
-
this.communicationHandler.onReconnect();
|
|
276
|
+
this.communicationHandler.onReconnect(false);
|
|
278
277
|
return [2 /*return*/];
|
|
279
278
|
}
|
|
280
279
|
});
|
|
@@ -389,7 +388,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
389
388
|
return __awaiter(this, void 0, void 0, function () {
|
|
390
389
|
var consumer, messageJson;
|
|
391
390
|
return __generator(this, function (_a) {
|
|
392
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
391
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("updateSpatialForTrack");
|
|
393
392
|
consumer = this.consumers.find(function (consumer) { return consumer.appData.producerData.trackId === track.trackId; });
|
|
394
393
|
if (consumer) {
|
|
395
394
|
messageJson = { to: "self", type: SFUMessageType.UpdateSpatialConsumer, message: { id: consumer.id, spatialLayer: spatialLayerIndex } };
|
|
@@ -408,10 +407,11 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
408
407
|
switch (_f.label) {
|
|
409
408
|
case 0:
|
|
410
409
|
if (!this.sendTransport) {
|
|
411
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
410
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("No Send Transport", track);
|
|
412
411
|
return [2 /*return*/];
|
|
413
412
|
}
|
|
414
413
|
if (!(track && track.track)) return [3 /*break*/, 4];
|
|
414
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("Inside send Track");
|
|
415
415
|
producer = this.producers.find(function (producer) { return producer.appData.trackId === track.trackId; });
|
|
416
416
|
if (producer && producer.closed === false && ((_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.isMobileApp)) {
|
|
417
417
|
this.stopTrack(track);
|
|
@@ -446,7 +446,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
446
446
|
producerData.codecOptions.opusMaxAverageBitrate = (_d = this.meetingStartRequest) === null || _d === void 0 ? void 0 : _d.maxAudioBitrateConfig;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
449
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(producerData);
|
|
450
450
|
return [4 /*yield*/, ((_e = this.sendTransport) === null || _e === void 0 ? void 0 : _e.produce(producerData))];
|
|
451
451
|
case 3:
|
|
452
452
|
webcamProducer = _f.sent();
|
|
@@ -515,7 +515,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
515
515
|
return __awaiter(this, void 0, void 0, function () {
|
|
516
516
|
var messageJson;
|
|
517
517
|
return __generator(this, function (_a) {
|
|
518
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
518
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("SFU Init");
|
|
519
519
|
messageJson = { to: "self", type: SFUMessageType.GetRouterRtpCapabilities, message: SFUMessageType.GetRouterRtpCapabilities };
|
|
520
520
|
this.sendSFUMessageToSocket(messageJson);
|
|
521
521
|
this.addObserverForDevice();
|
|
@@ -556,7 +556,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
556
556
|
this.sendTransport = undefined;
|
|
557
557
|
}
|
|
558
558
|
this.isProduceTrackIntialWorkDone = false;
|
|
559
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
559
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("OnCreateTransportsForcefully");
|
|
560
560
|
messageJson = { to: "self", type: SFUMessageType.OnCreateTransportsForcefully, message: SFUMessageType.OnCreateTransportsForcefully };
|
|
561
561
|
this.sendSFUMessageToSocket(messageJson);
|
|
562
562
|
return [2 /*return*/];
|
|
@@ -613,11 +613,11 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
613
613
|
if (data && data.message && data.message.rtpCapabilities) {
|
|
614
614
|
this.routerRtpCapabilities = data.message.rtpCapabilities;
|
|
615
615
|
var routerRtpCapabilities = this.routerRtpCapabilities;
|
|
616
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
616
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(routerRtpCapabilities);
|
|
617
617
|
this.getDevice().load({ routerRtpCapabilities: routerRtpCapabilities });
|
|
618
618
|
this.isProduceTrackIntialWorkDone = false;
|
|
619
619
|
//Create transport
|
|
620
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
620
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("OnCreateTransports onRouterRtpCapabilities");
|
|
621
621
|
var messageJson = { to: "self", type: SFUMessageType.OnCreateTransports, message: SFUMessageType.OnCreateTransports };
|
|
622
622
|
this.sendSFUMessageToSocket(messageJson);
|
|
623
623
|
}
|
|
@@ -691,14 +691,14 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
691
691
|
SFUHandler.prototype.produceTracks = function () {
|
|
692
692
|
var _this = this;
|
|
693
693
|
var _a, _b;
|
|
694
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
694
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("produceTracks", this.sendTransport, this.consumerTransport, this.isProduceTrackIntialWorkDone);
|
|
695
695
|
if (!this.sendTransport || !this.consumerTransport || this.isProduceTrackIntialWorkDone) {
|
|
696
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
696
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("produceTracks", this.sendTransport, this.consumerTransport, this.isProduceTrackIntialWorkDone);
|
|
697
697
|
return;
|
|
698
698
|
}
|
|
699
699
|
this.isProduceTrackIntialWorkDone = true;
|
|
700
700
|
var selfTracks = (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getAllSelfTracks();
|
|
701
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
701
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("produceTracks selfTracks", selfTracks);
|
|
702
702
|
if (selfTracks && selfTracks.length > 0) {
|
|
703
703
|
selfTracks.forEach(function (track) {
|
|
704
704
|
_this.sendTrack(track);
|
|
@@ -731,7 +731,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
731
731
|
};
|
|
732
732
|
SFUHandler.prototype.sendSFUMessageToSocket = function (messageJson) {
|
|
733
733
|
var _a;
|
|
734
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
734
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("sendMessage sendSFUMessageToSocket", messageJson);
|
|
735
735
|
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendWebSocketMessage(SFUMessageType.SFUMessage, messageJson);
|
|
736
736
|
};
|
|
737
737
|
SFUHandler.prototype.onSocketMessage = function (websocketCallHandler) {
|
|
@@ -793,7 +793,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
793
793
|
};
|
|
794
794
|
SFUHandler.prototype.onTrackEnded = function (data) {
|
|
795
795
|
var _a, _b, _c;
|
|
796
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
796
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onTrackEnded");
|
|
797
797
|
if (data && data.message && data.message.producerId) {
|
|
798
798
|
var producerId_1 = data.message.producerId;
|
|
799
799
|
var consumer = this.consumers.find(function (consumer) { return consumer.appData.producerData.producerId === producerId_1; });
|
|
@@ -819,8 +819,9 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
819
819
|
return __awaiter(this, void 0, void 0, function () {
|
|
820
820
|
var producer, producerId, consumerAppData, cosumeObj, message;
|
|
821
821
|
return __generator(this, function (_a) {
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onNewProducer");
|
|
823
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
824
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("consumerTransport", this.consumerTransport);
|
|
824
825
|
if (this.consumerTransport && data && data.message && data.message.producer) {
|
|
825
826
|
producer = data.message.producer;
|
|
826
827
|
producerId = producer.id;
|
|
@@ -845,8 +846,8 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
845
846
|
var consumerObj, consumerObj;
|
|
846
847
|
var _this = this;
|
|
847
848
|
return __generator(this, function (_a) {
|
|
848
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
849
|
-
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
849
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onServerConsumer");
|
|
850
|
+
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
850
851
|
if (this.consumerTransport && data && data.message && data.message.consumer) {
|
|
851
852
|
if (data.message.consumer.appData.producerData.trackKind === TrackKind.DataChannel) {
|
|
852
853
|
consumerObj = data.message.consumer;
|
|
@@ -872,7 +873,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
872
873
|
_this.consumers.push(consumer);
|
|
873
874
|
var mediaTrack = consumer.track;
|
|
874
875
|
var data = consumer.appData.producerData;
|
|
875
|
-
_this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && log
|
|
876
|
+
_this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(data);
|
|
876
877
|
var participant = (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.participantByUserId(data.participant.userId);
|
|
877
878
|
if (!participant) {
|
|
878
879
|
_this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("addParticipantIfNotExist from onServerConsumer", data.participant);
|