vani-meeting-client 0.8.8 → 0.8.9
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 +0 -1
- package/lib/MeetingHandler.js +0 -11
- package/lib/model/MeetingStartRequest.d.ts +1 -0
- package/lib/model/MeetingStartRequest.js +1 -0
- package/lib/video-call-handler/SFUHandler.js +3 -2
- package/lib/websocket-handler/WebsocketHandler.d.ts +0 -1
- package/lib/websocket-handler/WebsocketHandler.js +0 -1
- package/package.json +1 -1
package/lib/MeetingHandler.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ export declare class MeetingHandler {
|
|
|
41
41
|
onOldMessages(data: any): Promise<void>;
|
|
42
42
|
checkSocket(): Promise<void>;
|
|
43
43
|
startMeeting(): Promise<void>;
|
|
44
|
-
startBroadcasting(): Promise<void>;
|
|
45
44
|
getMeetingStartTime(): Promise<void>;
|
|
46
45
|
startRTMPStream(urls: string[]): Promise<void>;
|
|
47
46
|
getEventEmitter(): VaniEventListener | undefined;
|
package/lib/MeetingHandler.js
CHANGED
|
@@ -392,17 +392,6 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
392
392
|
});
|
|
393
393
|
});
|
|
394
394
|
};
|
|
395
|
-
MeetingHandler.prototype.startBroadcasting = function () {
|
|
396
|
-
var _a;
|
|
397
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
398
|
-
var messageJson;
|
|
399
|
-
return __generator(this, function (_b) {
|
|
400
|
-
messageJson = { to: "self", type: SFUMessageType.StartBroadcasting, message: { isAudioRequired: true, isVideoRequired: true, connectToIp: "139.59.80.164", audio: { port: 9000, rtcpPort: 9001 }, video: { port: 9002, rtcpPort: 9003 } } };
|
|
401
|
-
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendWebSocketMessage(SFUMessageType.SFUMessage, messageJson);
|
|
402
|
-
return [2 /*return*/];
|
|
403
|
-
});
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
395
|
MeetingHandler.prototype.getMeetingStartTime = function () {
|
|
407
396
|
var _a, _b;
|
|
408
397
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -38,6 +38,7 @@ export declare class MeetingStartRequest {
|
|
|
38
38
|
defaultCameraFacingMode: CameraFacingMode;
|
|
39
39
|
simulcastEncodings: RTCRtpEncodingParameters[];
|
|
40
40
|
isDataChannelRequired: boolean;
|
|
41
|
+
shouldPauseUploadingStreamOnSingleParticipant: boolean;
|
|
41
42
|
urlToCheckInternetPresent: string;
|
|
42
43
|
constructor(_roomId: string, _userId: string, _appId: string, _wssUrl: string);
|
|
43
44
|
}
|
|
@@ -33,6 +33,7 @@ var MeetingStartRequest = /** @class */ (function () {
|
|
|
33
33
|
this.defaultCameraFacingMode = CameraFacingMode.Front;
|
|
34
34
|
this.simulcastEncodings = [{ maxBitrate: 40000, scaleResolutionDownBy: 2.0 }, { maxBitrate: 620000, scaleResolutionDownBy: 1.0 },];
|
|
35
35
|
this.isDataChannelRequired = false;
|
|
36
|
+
this.shouldPauseUploadingStreamOnSingleParticipant = true;
|
|
36
37
|
this.urlToCheckInternetPresent = "https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Stack%20Overflow";
|
|
37
38
|
this.roomId = _roomId;
|
|
38
39
|
this.userId = _userId;
|
|
@@ -259,10 +259,11 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
259
259
|
});
|
|
260
260
|
};
|
|
261
261
|
SFUHandler.prototype.onParticipantUpdated = function () {
|
|
262
|
+
var _a;
|
|
262
263
|
if (this.producers) {
|
|
263
|
-
if (!this.communicationHandler || this.communicationHandler.getAllParticipants().length < 2) {
|
|
264
|
+
if (((_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.shouldPauseUploadingStreamOnSingleParticipant) && (!this.communicationHandler || this.communicationHandler.getAllParticipants().length < 2)) {
|
|
264
265
|
this.producers.forEach(function (producer) {
|
|
265
|
-
producer.
|
|
266
|
+
producer.pause();
|
|
266
267
|
});
|
|
267
268
|
}
|
|
268
269
|
else {
|
|
@@ -32,7 +32,6 @@ export declare enum WebSocketBasicEvents {
|
|
|
32
32
|
export declare enum SFUMessageType {
|
|
33
33
|
SFUMessage = "sfuMessage",
|
|
34
34
|
GetRouterRtpCapabilities = "routerRtpCapabilities",
|
|
35
|
-
StartBroadcasting = "startBroadcasting",
|
|
36
35
|
OnRouterRtpCapabilities = "onRouterRtpCapabilities",
|
|
37
36
|
OnTransportConnect = "transportConnect",
|
|
38
37
|
OnCreateTransports = "createTransports",
|
|
@@ -88,7 +88,6 @@ export var SFUMessageType;
|
|
|
88
88
|
(function (SFUMessageType) {
|
|
89
89
|
SFUMessageType["SFUMessage"] = "sfuMessage";
|
|
90
90
|
SFUMessageType["GetRouterRtpCapabilities"] = "routerRtpCapabilities";
|
|
91
|
-
SFUMessageType["StartBroadcasting"] = "startBroadcasting";
|
|
92
91
|
SFUMessageType["OnRouterRtpCapabilities"] = "onRouterRtpCapabilities";
|
|
93
92
|
SFUMessageType["OnTransportConnect"] = "transportConnect";
|
|
94
93
|
SFUMessageType["OnCreateTransports"] = "createTransports";
|