mezon-js 2.9.71 → 2.9.73
Sign up to get free protection for your applications and to get access to all the features.
- package/client.ts +6 -0
- package/dist/client.d.ts +5 -0
- package/dist/mezon-js.cjs.js +8 -4
- package/dist/mezon-js.esm.mjs +8 -4
- package/dist/web_socket_adapter.d.ts +0 -7
- package/package.json +1 -1
- package/web_socket_adapter.ts +0 -12
package/client.ts
CHANGED
@@ -181,6 +181,12 @@ export enum NotificationType {
|
|
181
181
|
NOTHING_MESSAGE = 3,
|
182
182
|
}
|
183
183
|
|
184
|
+
export enum WebrtcSignalingType {
|
185
|
+
WEBRTC_SDP_OFFER = 1,
|
186
|
+
WEBRTC_SDP_ANSWER = 2,
|
187
|
+
WEBRTC_ICE_CANDIDATE = 3
|
188
|
+
}
|
189
|
+
|
184
190
|
/** Response for an RPC function executed on the server. */
|
185
191
|
export interface RpcResponse {
|
186
192
|
/** The identifier of the function. */
|
package/dist/client.d.ts
CHANGED
@@ -40,6 +40,11 @@ export declare enum NotificationType {
|
|
40
40
|
MENTION_MESSAGE = 2,
|
41
41
|
NOTHING_MESSAGE = 3
|
42
42
|
}
|
43
|
+
export declare enum WebrtcSignalingType {
|
44
|
+
WEBRTC_SDP_OFFER = 1,
|
45
|
+
WEBRTC_SDP_ANSWER = 2,
|
46
|
+
WEBRTC_ICE_CANDIDATE = 3
|
47
|
+
}
|
43
48
|
/** Response for an RPC function executed on the server. */
|
44
49
|
export interface RpcResponse {
|
45
50
|
/** The identifier of the function. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -60,7 +60,8 @@ __export(mezon_js_exports, {
|
|
60
60
|
DefaultSocket: () => DefaultSocket,
|
61
61
|
NotificationType: () => NotificationType,
|
62
62
|
Session: () => Session,
|
63
|
-
WebSocketAdapterText: () => WebSocketAdapterText
|
63
|
+
WebSocketAdapterText: () => WebSocketAdapterText,
|
64
|
+
WebrtcSignalingType: () => WebrtcSignalingType
|
64
65
|
});
|
65
66
|
module.exports = __toCommonJS(mezon_js_exports);
|
66
67
|
|
@@ -6594,9 +6595,6 @@ var WebSocketAdapterText = class {
|
|
6594
6595
|
}
|
6595
6596
|
this._socket.send(JSON.stringify(msg));
|
6596
6597
|
}
|
6597
|
-
getRTCPeerConnection() {
|
6598
|
-
return this._pcRef;
|
6599
|
-
}
|
6600
6598
|
};
|
6601
6599
|
|
6602
6600
|
// socket.ts
|
@@ -7427,6 +7425,12 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
7427
7425
|
NotificationType2[NotificationType2["NOTHING_MESSAGE"] = 3] = "NOTHING_MESSAGE";
|
7428
7426
|
return NotificationType2;
|
7429
7427
|
})(NotificationType || {});
|
7428
|
+
var WebrtcSignalingType = /* @__PURE__ */ ((WebrtcSignalingType2) => {
|
7429
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_OFFER"] = 1] = "WEBRTC_SDP_OFFER";
|
7430
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_ANSWER"] = 2] = "WEBRTC_SDP_ANSWER";
|
7431
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_ICE_CANDIDATE"] = 3] = "WEBRTC_ICE_CANDIDATE";
|
7432
|
+
return WebrtcSignalingType2;
|
7433
|
+
})(WebrtcSignalingType || {});
|
7430
7434
|
var Client = class {
|
7431
7435
|
constructor(serverkey = DEFAULT_SERVER_KEY, host = DEFAULT_HOST, port = DEFAULT_PORT, useSSL = false, timeout = DEFAULT_TIMEOUT_MS, autoRefreshSession = true) {
|
7432
7436
|
this.serverkey = serverkey;
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6565,9 +6565,6 @@ var WebSocketAdapterText = class {
|
|
6565
6565
|
}
|
6566
6566
|
this._socket.send(JSON.stringify(msg));
|
6567
6567
|
}
|
6568
|
-
getRTCPeerConnection() {
|
6569
|
-
return this._pcRef;
|
6570
|
-
}
|
6571
6568
|
};
|
6572
6569
|
|
6573
6570
|
// socket.ts
|
@@ -7398,6 +7395,12 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
7398
7395
|
NotificationType2[NotificationType2["NOTHING_MESSAGE"] = 3] = "NOTHING_MESSAGE";
|
7399
7396
|
return NotificationType2;
|
7400
7397
|
})(NotificationType || {});
|
7398
|
+
var WebrtcSignalingType = /* @__PURE__ */ ((WebrtcSignalingType2) => {
|
7399
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_OFFER"] = 1] = "WEBRTC_SDP_OFFER";
|
7400
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_SDP_ANSWER"] = 2] = "WEBRTC_SDP_ANSWER";
|
7401
|
+
WebrtcSignalingType2[WebrtcSignalingType2["WEBRTC_ICE_CANDIDATE"] = 3] = "WEBRTC_ICE_CANDIDATE";
|
7402
|
+
return WebrtcSignalingType2;
|
7403
|
+
})(WebrtcSignalingType || {});
|
7401
7404
|
var Client = class {
|
7402
7405
|
constructor(serverkey = DEFAULT_SERVER_KEY, host = DEFAULT_HOST, port = DEFAULT_PORT, useSSL = false, timeout = DEFAULT_TIMEOUT_MS, autoRefreshSession = true) {
|
7403
7406
|
this.serverkey = serverkey;
|
@@ -9784,5 +9787,6 @@ export {
|
|
9784
9787
|
DefaultSocket,
|
9785
9788
|
NotificationType,
|
9786
9789
|
Session,
|
9787
|
-
WebSocketAdapterText
|
9790
|
+
WebSocketAdapterText,
|
9791
|
+
WebrtcSignalingType
|
9788
9792
|
};
|
@@ -63,12 +63,6 @@ export interface SocketMessageHandler {
|
|
63
63
|
export interface SocketOpenHandler {
|
64
64
|
(this: WebSocket, evt: Event): void;
|
65
65
|
}
|
66
|
-
export interface RTCPeerOntrackHandler {
|
67
|
-
(this: RTCPeerConnection, ev: RTCTrackEvent): any | null;
|
68
|
-
}
|
69
|
-
export interface RTCPeerOnicecandidateHandler {
|
70
|
-
(this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent): any;
|
71
|
-
}
|
72
66
|
/**
|
73
67
|
* A text-based socket adapter that accepts and transmits payloads over UTF-8.
|
74
68
|
*/
|
@@ -87,5 +81,4 @@ export declare class WebSocketAdapterText implements WebSocketAdapter {
|
|
87
81
|
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, platform: string, signal?: AbortSignal): void;
|
88
82
|
close(): void;
|
89
83
|
send(msg: any): void;
|
90
|
-
getRTCPeerConnection(): RTCPeerConnection;
|
91
84
|
}
|
package/package.json
CHANGED
package/web_socket_adapter.ts
CHANGED
@@ -84,14 +84,6 @@ export interface SocketOpenHandler {
|
|
84
84
|
(this: WebSocket, evt: Event): void;
|
85
85
|
}
|
86
86
|
|
87
|
-
export interface RTCPeerOntrackHandler {
|
88
|
-
(this: RTCPeerConnection, ev: RTCTrackEvent): any | null;
|
89
|
-
}
|
90
|
-
|
91
|
-
export interface RTCPeerOnicecandidateHandler {
|
92
|
-
(this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent): any;
|
93
|
-
}
|
94
|
-
|
95
87
|
/**
|
96
88
|
* A text-based socket adapter that accepts and transmits payloads over UTF-8.
|
97
89
|
*/
|
@@ -195,8 +187,4 @@ export class WebSocketAdapterText implements WebSocketAdapter {
|
|
195
187
|
|
196
188
|
this._socket!.send(JSON.stringify(msg));
|
197
189
|
}
|
198
|
-
|
199
|
-
getRTCPeerConnection(): RTCPeerConnection {
|
200
|
-
return this._pcRef!;
|
201
|
-
}
|
202
190
|
}
|