@d-id/client-sdk 2.0.6-staging.401 → 2.0.7-staging.403
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/dist/{index-CDeSgDvR.js → index-Blb-TUoJ.js} +314 -313
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/{livekit-manager-Der3_cF-.js → livekit-manager-BW499fIa.js} +4 -2
- package/dist/src/services/agent-manager/connect-to-manager.d.ts +2 -1
- package/dist/src/types/stream/stream.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Be, C as J, S as f, a as Je, b as Qe, A as m, d as We, l as pe, e as qe, t as Ge, f as A, g as U, h as He, D as ge, i as Xe, j as b, n as Ze } from "./index-
|
|
1
|
+
import { c as Be, C as J, S as f, a as Je, b as Qe, A as m, d as We, l as pe, e as qe, t as Ge, f as A, g as U, h as He, D as ge, i as Xe, j as b, n as Ze } from "./index-Blb-TUoJ.js";
|
|
2
2
|
function Ye() {
|
|
3
3
|
try {
|
|
4
4
|
return Intl.DateTimeFormat().resolvedOptions().timeZone ?? "";
|
|
@@ -35,7 +35,7 @@ const on = {
|
|
|
35
35
|
}, he = 2e4, rn = [];
|
|
36
36
|
async function an() {
|
|
37
37
|
try {
|
|
38
|
-
return await import("./index-
|
|
38
|
+
return await import("./index-Blb-TUoJ.js").then((l) => l.F);
|
|
39
39
|
} catch {
|
|
40
40
|
throw new Error(
|
|
41
41
|
"LiveKit client is required for this streaming manager. Please install it using: npm install livekit-client"
|
|
@@ -66,6 +66,8 @@ async function un(l, C, u) {
|
|
|
66
66
|
// Must be false to use mediaStreamTrack directly
|
|
67
67
|
dynacast: !0
|
|
68
68
|
});
|
|
69
|
+
for (const [e, t] of u.rpcMethods ?? [])
|
|
70
|
+
a.registerRpcMethod(e, t);
|
|
69
71
|
let R = null, M = m.Idle, W = !0;
|
|
70
72
|
const y = /* @__PURE__ */ new Map();
|
|
71
73
|
let x = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StreamingManager } from '../streaming-manager';
|
|
2
|
-
import { Agent, AgentManagerOptions, AgentsAPI, AudioDetectionMetrics, Chat, ChatProgressCallback, CreateSessionV2Options, CreateStreamOptions } from '../../types';
|
|
2
|
+
import { Agent, AgentManagerOptions, AgentsAPI, AudioDetectionMetrics, Chat, ChatProgressCallback, CreateSessionV2Options, CreateStreamOptions, StreamingManagerOptions } from '../../types';
|
|
3
3
|
import { Analytics } from '../analytics/mixpanel';
|
|
4
4
|
|
|
5
5
|
type ConnectToManagerOptions = AgentManagerOptions & {
|
|
@@ -10,6 +10,7 @@ type ConnectToManagerOptions = AgentManagerOptions & {
|
|
|
10
10
|
onFirstAudioDetected?: (metrics: AudioDetectionMetrics) => void;
|
|
11
11
|
};
|
|
12
12
|
chatId?: string;
|
|
13
|
+
rpcMethods?: StreamingManagerOptions['rpcMethods'];
|
|
13
14
|
};
|
|
14
15
|
export declare function initializeStreamAndChat(agent: Agent, options: ConnectToManagerOptions, agentsApi: AgentsAPI, analytics: Analytics, chat?: Chat): Promise<{
|
|
15
16
|
chat?: Chat;
|
|
@@ -70,6 +70,10 @@ export declare enum StreamType {
|
|
|
70
70
|
Legacy = "legacy",
|
|
71
71
|
Fluent = "fluent"
|
|
72
72
|
}
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type RpcMethodHandler = (data: {
|
|
75
|
+
payload: string;
|
|
76
|
+
}) => Promise<string>;
|
|
73
77
|
export interface ManagerCallbacks {
|
|
74
78
|
onMessage?: ChatProgressCallback;
|
|
75
79
|
onConnectionStateChange?: (state: ConnectionState, reason?: string) => void;
|
|
@@ -128,6 +132,12 @@ export interface StreamingManagerOptions {
|
|
|
128
132
|
* Supported by LiveKit streaming managers.
|
|
129
133
|
*/
|
|
130
134
|
microphoneStream?: MediaStream;
|
|
135
|
+
/**
|
|
136
|
+
* RPC methods to register on the room before it connects, so the agent can
|
|
137
|
+
* call them from the moment this participant joins.
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
rpcMethods?: ReadonlyMap<string, RpcMethodHandler>;
|
|
131
141
|
}
|
|
132
142
|
export interface SlimRTCStatsReport {
|
|
133
143
|
index: number;
|