vani-meeting-server 2.6.5 → 2.6.6
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/lib/redis/RedisHandler.js +1 -1
- package/lib/models/Event.js +1 -1
- package/lib/models/Logs.js +1 -1
- package/lib/models/MessagePayload.js +2 -2
- package/lib/models/WebSocketServerStartRequest.js +2 -2
- package/lib/sfu/SFUEachRoomHandler.d.ts +2 -4
- package/lib/sfu/SFUEachRoomHandler.js +2 -1
- package/lib/sfu/SFUEachRoomUserHandler.d.ts +3 -3
- package/lib/utility/Constant.d.ts +1 -1
- package/lib/utility/Constant.js +4 -4
- package/lib/utility/VaniEventListener.d.ts +0 -1
- package/lib/websocket/EachSocketConnectionHandler.js +4 -4
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ var RedisKeyType;
|
|
|
15
15
|
RedisKeyType["MeetingTime"] = "meetingTime";
|
|
16
16
|
RedisKeyType["Participants"] = "participants";
|
|
17
17
|
RedisKeyType["IpAddress"] = "ipAddress";
|
|
18
|
-
})(RedisKeyType
|
|
18
|
+
})(RedisKeyType || (exports.RedisKeyType = RedisKeyType = {}));
|
|
19
19
|
class RedisHandler {
|
|
20
20
|
static redisHandler = new RedisHandler();
|
|
21
21
|
redisClient;
|
package/lib/models/Event.js
CHANGED
|
@@ -15,4 +15,4 @@ var VaniEvent;
|
|
|
15
15
|
VaniEvent["OnLog"] = "OnLog";
|
|
16
16
|
VaniEvent["OnNewChatMessageReceived"] = "OnNewChatMessageReceived";
|
|
17
17
|
VaniEvent["OnClientPingRecieved"] = "OnClientPingRecieved";
|
|
18
|
-
})(VaniEvent
|
|
18
|
+
})(VaniEvent || (exports.VaniEvent = VaniEvent = {}));
|
package/lib/models/Logs.js
CHANGED
|
@@ -6,12 +6,12 @@ var ChatMessageType;
|
|
|
6
6
|
ChatMessageType["Chat"] = "chat";
|
|
7
7
|
ChatMessageType["File"] = "file";
|
|
8
8
|
ChatMessageType["Info"] = "info";
|
|
9
|
-
})(ChatMessageType
|
|
9
|
+
})(ChatMessageType || (exports.ChatMessageType = ChatMessageType = {}));
|
|
10
10
|
var ChatSendVia;
|
|
11
11
|
(function (ChatSendVia) {
|
|
12
12
|
ChatSendVia["WebSocket"] = "WebSocket";
|
|
13
13
|
ChatSendVia["DataChannel"] = "DataChannel";
|
|
14
|
-
})(ChatSendVia
|
|
14
|
+
})(ChatSendVia || (exports.ChatSendVia = ChatSendVia = {}));
|
|
15
15
|
class MessagePayload {
|
|
16
16
|
message;
|
|
17
17
|
to = "all";
|
|
@@ -5,7 +5,7 @@ var ConnectionProtocol;
|
|
|
5
5
|
(function (ConnectionProtocol) {
|
|
6
6
|
ConnectionProtocol["TCP"] = "TCP";
|
|
7
7
|
ConnectionProtocol["UDP"] = "UDP";
|
|
8
|
-
})(ConnectionProtocol
|
|
8
|
+
})(ConnectionProtocol || (exports.ConnectionProtocol = ConnectionProtocol = {}));
|
|
9
9
|
var LogLevel;
|
|
10
10
|
(function (LogLevel) {
|
|
11
11
|
LogLevel[LogLevel["None"] = 4] = "None";
|
|
@@ -13,7 +13,7 @@ var LogLevel;
|
|
|
13
13
|
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
14
14
|
LogLevel[LogLevel["Warn"] = 1] = "Warn";
|
|
15
15
|
LogLevel[LogLevel["Error"] = 0] = "Error";
|
|
16
|
-
})(LogLevel
|
|
16
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
17
17
|
class WebSocketServerStartRequest {
|
|
18
18
|
port = 4010;
|
|
19
19
|
redisUrl = "redis://127.0.0.1:6379";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { Consumer } from "mediasoup/node/lib/Consumer";
|
|
2
|
-
import { Producer } from "mediasoup/node/lib/Producer";
|
|
3
|
-
import { Router } from "mediasoup/node/lib/Router";
|
|
4
|
-
import { Worker } from "mediasoup/node/lib/Worker";
|
|
5
1
|
import { BaseSFUWebsocket } from "../base/BaseSFUWebsocket";
|
|
6
2
|
import { Participant } from "../models/Participant";
|
|
7
3
|
import { ConnectionProtocol } from "../models/WebSocketServerStartRequest";
|
|
8
4
|
import { PlainTransportPayload } from "../ServerHandler";
|
|
9
5
|
import { MultiSystemEventsBody, SFUMessageType } from "../websocket/EachSocketConnectionHandler";
|
|
10
6
|
import { SFUEachRoomUserHandler } from "./SFUEachRoomUserHandler";
|
|
7
|
+
import { Consumer } from "mediasoup/node/lib/ConsumerTypes";
|
|
8
|
+
import { Producer, Router, Worker } from "mediasoup/node/lib/types";
|
|
11
9
|
export interface SFUEachRoomParticipantInterface {
|
|
12
10
|
participant: Participant;
|
|
13
11
|
}
|
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.SFUEachRoomHandler = void 0;
|
|
27
|
+
// import { PlainTransport } from "mediasoup/node/lib/PlainTransport";
|
|
27
28
|
const BaseSFUWebsocket_1 = require("../base/BaseSFUWebsocket");
|
|
28
29
|
const RedisHandler_1 = require("../lib/redis/RedisHandler");
|
|
29
30
|
const Event_1 = require("../models/Event");
|
|
@@ -413,7 +414,7 @@ class SFUEachRoomHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
413
414
|
try {
|
|
414
415
|
this.plainTransportConsumers.push(await plainTransport.consume({
|
|
415
416
|
producerId: producer.id,
|
|
416
|
-
rtpCapabilities: this.sendRouter.rtpCapabilities,
|
|
417
|
+
rtpCapabilities: this.sendRouter.rtpCapabilities, // Assume the recorder supports same formats as mediasoup's router
|
|
417
418
|
paused: true,
|
|
418
419
|
}));
|
|
419
420
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Router } from "mediasoup/node/lib/Router";
|
|
2
1
|
import { BaseSFUWebsocket } from "../base/BaseSFUWebsocket";
|
|
3
2
|
import { Participant } from "../models/Participant";
|
|
4
3
|
import { SFUEachRoomHandlerInterface, SFUMessageBody } from "./SFUEachRoomHandler";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Router } from "mediasoup/node/lib/RouterTypes";
|
|
5
|
+
import { Producer } from "mediasoup/node/lib/ProducerTypes";
|
|
6
|
+
import { Consumer } from "mediasoup/node/lib/ConsumerTypes";
|
|
7
7
|
export declare class SFUEachRoomUserHandler extends BaseSFUWebsocket {
|
|
8
8
|
private isUserPresentInRoom;
|
|
9
9
|
selfParticipant: Participant;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RtpCodecCapability } from "mediasoup/node/lib/
|
|
1
|
+
import { RtpCodecCapability } from "mediasoup/node/lib/rtpParametersTypes";
|
|
2
2
|
import { ConnectionProtocol } from "../models/WebSocketServerStartRequest";
|
|
3
3
|
export declare const mediaCodecs: RtpCodecCapability[];
|
|
4
4
|
export declare function webrtcTransportConfiguration(perferProtocol: ConnectionProtocol): Promise<{
|
package/lib/utility/Constant.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mediaCodecs = void 0;
|
|
4
|
+
exports.webrtcTransportConfiguration = webrtcTransportConfiguration;
|
|
5
|
+
exports.getPublicIp = getPublicIp;
|
|
6
|
+
exports.plainTransportConfiguration = plainTransportConfiguration;
|
|
4
7
|
const WebSocketServerStartRequest_1 = require("../models/WebSocketServerStartRequest");
|
|
5
8
|
const ServerHandler_1 = require("../ServerHandler");
|
|
6
9
|
const publicIp = require('public-ip');
|
|
@@ -60,7 +63,6 @@ async function webrtcTransportConfiguration(perferProtocol) {
|
|
|
60
63
|
enableSctp: true,
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
|
-
exports.webrtcTransportConfiguration = webrtcTransportConfiguration;
|
|
64
66
|
;
|
|
65
67
|
async function getPublicIp() {
|
|
66
68
|
if (!publicIpAddress) {
|
|
@@ -68,7 +70,6 @@ async function getPublicIp() {
|
|
|
68
70
|
}
|
|
69
71
|
return publicIpAddress;
|
|
70
72
|
}
|
|
71
|
-
exports.getPublicIp = getPublicIp;
|
|
72
73
|
async function plainTransportConfiguration() {
|
|
73
74
|
if (!publicIpAddress) {
|
|
74
75
|
publicIpAddress = await publicIp.v4();
|
|
@@ -79,6 +80,5 @@ async function plainTransportConfiguration() {
|
|
|
79
80
|
listenIp: { ip: '0.0.0.0', announcedIp: publicIpAddress },
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
|
-
exports.plainTransportConfiguration = plainTransportConfiguration;
|
|
83
83
|
;
|
|
84
84
|
exports.default = { plainTransportConfiguration, webrtcTransportConfiguration, getPublicIp };
|
|
@@ -47,7 +47,7 @@ var WebSocketBasicEvents;
|
|
|
47
47
|
WebSocketBasicEvents["Message"] = "message";
|
|
48
48
|
WebSocketBasicEvents["OnChat"] = "chat";
|
|
49
49
|
WebSocketBasicEvents["SelfLeft"] = "selfLeft";
|
|
50
|
-
})(WebSocketBasicEvents
|
|
50
|
+
})(WebSocketBasicEvents || (exports.WebSocketBasicEvents = WebSocketBasicEvents = {}));
|
|
51
51
|
var SFUMessageType;
|
|
52
52
|
(function (SFUMessageType) {
|
|
53
53
|
SFUMessageType["SFUMessage"] = "sfuMessage";
|
|
@@ -87,7 +87,7 @@ var SFUMessageType;
|
|
|
87
87
|
// );
|
|
88
88
|
// }
|
|
89
89
|
SFUMessageType["OnProducerNotFound"] = "OnProducerNotFound";
|
|
90
|
-
})(SFUMessageType
|
|
90
|
+
})(SFUMessageType || (exports.SFUMessageType = SFUMessageType = {}));
|
|
91
91
|
var MultiSystemEvents;
|
|
92
92
|
(function (MultiSystemEvents) {
|
|
93
93
|
MultiSystemEvents["OnNewServerJoinedForRoom"] = "OnNewServerJoinedForRoom";
|
|
@@ -96,14 +96,14 @@ var MultiSystemEvents;
|
|
|
96
96
|
MultiSystemEvents["OnConnectPipe"] = "OnConnectPipe";
|
|
97
97
|
MultiSystemEvents["OnPipeConnected"] = "OnPipeConnected";
|
|
98
98
|
MultiSystemEvents["OnPipeClosed"] = "OnPipeClosed";
|
|
99
|
-
})(MultiSystemEvents
|
|
99
|
+
})(MultiSystemEvents || (exports.MultiSystemEvents = MultiSystemEvents = {}));
|
|
100
100
|
var LocalMessageType;
|
|
101
101
|
(function (LocalMessageType) {
|
|
102
102
|
LocalMessageType["OnNewUserJoinedRoom"] = "onNewUserJoinedRoom";
|
|
103
103
|
LocalMessageType["OnUserLeft"] = "OnUserLeft";
|
|
104
104
|
LocalMessageType["SocketMessage"] = "socketMessage";
|
|
105
105
|
LocalMessageType["SelfLeftForceFully"] = "SelfLeftForceFully";
|
|
106
|
-
})(LocalMessageType
|
|
106
|
+
})(LocalMessageType || (exports.LocalMessageType = LocalMessageType = {}));
|
|
107
107
|
class EachSocketConnectionHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
108
108
|
uuid = (0, uuid_1.v4)();
|
|
109
109
|
socket;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vani-meeting-server",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
4
4
|
"description": "Vani Meeting Server SDK",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dotenv": "^16.0.2",
|
|
32
32
|
"express": "^4.18.1",
|
|
33
33
|
"helmet": "^6.0.0",
|
|
34
|
-
"mediasoup": "^3.
|
|
34
|
+
"mediasoup": "^3.15.1",
|
|
35
35
|
"public-ip": "4.0.3",
|
|
36
36
|
"typescript": "^5.6.2",
|
|
37
37
|
"uuid": "^9.0.0",
|