@formant/realtime-sdk 1.4.10 → 1.357.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.
|
@@ -39,7 +39,9 @@ export declare class RtcClient {
|
|
|
39
39
|
* Connects to a peer given its id.
|
|
40
40
|
* Returns the id of the session, if one is created.
|
|
41
41
|
*/
|
|
42
|
-
connect(remotePeerId: Uuid, rtcInfo?: IRtcInfo
|
|
42
|
+
connect(remotePeerId: Uuid, rtcInfo?: IRtcInfo, options?: {
|
|
43
|
+
lockDevice?: boolean;
|
|
44
|
+
}): Promise<Uuid | undefined>;
|
|
43
45
|
connectLan(agentEndpoint: string): Promise<Uuid | false>;
|
|
44
46
|
getConnections(): RtcConnection[];
|
|
45
47
|
createCustomDataChannel(remotePeerId: Uuid, channelName: string, init: RTCDataChannelInit, isBinary: boolean, listener: (peerId: Uuid, channel: RTCDataChannel) => void): () => void;
|
|
@@ -5,8 +5,12 @@ import { IRtcStreamMessage } from "./IRtcStreamMessage";
|
|
|
5
5
|
export type IRtcClientConfiguration = {
|
|
6
6
|
receive: (peerId: Uuid, message: IRtcStreamMessage) => void;
|
|
7
7
|
onStreamsInfoUpdate?: (peerId: Uuid, timestamp: Timestamp) => void;
|
|
8
|
+
/** Called when sending the connection signal fails (e.g. device locked). */
|
|
9
|
+
onConnectionError?: (error: unknown) => void;
|
|
8
10
|
alternateRTCPeerConnection?: typeof RTCPeerConnection;
|
|
9
11
|
sessionType?: SessionType;
|
|
12
|
+
/** When true, offer requests a device lock (all session types). Default false. */
|
|
13
|
+
lockDevice?: boolean;
|
|
10
14
|
} & ({
|
|
11
15
|
lanOnlyMode: true;
|
|
12
16
|
} | {
|
|
@@ -10,6 +10,8 @@ export interface IRtcConnectionBaseConfiguration {
|
|
|
10
10
|
localUserId?: Uuid;
|
|
11
11
|
remoteDeviceId?: Uuid;
|
|
12
12
|
sessionType?: SessionType;
|
|
13
|
+
/** When true, offer requests a device lock (all session types). Default false. */
|
|
14
|
+
lockDevice?: boolean;
|
|
13
15
|
receive: (peerId: Uuid, message: IRtcStreamMessage) => void;
|
|
14
16
|
onStreamsInfoUpdate?: (peerId: Uuid, timestamp: Timestamp) => void;
|
|
15
17
|
track?: (event: string, properties?: object) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formant/realtime-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.357.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/realtime-sdk/src/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"generic-pool": "^3.9.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@formant/core": "
|
|
24
|
+
"@formant/core": "*",
|
|
25
25
|
"@formant/protos": "*",
|
|
26
26
|
"@formant/rtc-client": "*",
|
|
27
27
|
"assert": "^2.1.0",
|
|
@@ -52,4 +52,4 @@
|
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": "^24.0.0"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|