@avaturn-live/web-sdk 0.2.1 → 0.3.0
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/main.cjs +14 -14
- package/dist/main.d.ts +21 -1
- package/dist/main.js +135 -118
- package/dist/type.d.ts +16 -0
- package/package.json +1 -1
package/dist/type.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DailyDeviceInfos } from "@daily-co/daily-js";
|
|
1
2
|
export type AvatarSpeechEvent = "avatar_started_speaking" | "avatar_ended_speaking" | "avatar_started_speaking_phrase" | "avatar_ended_speaking_phrase";
|
|
2
3
|
export type AvaturnHeadEvent = "init" | "task" | "dispose" | "idle" | "local_audio_change" | AvatarSpeechEvent;
|
|
3
4
|
export interface AvaturnEventData extends Record<AvaturnHeadEvent, any> {
|
|
@@ -41,6 +42,11 @@ export interface AvaturnHeadConfig {
|
|
|
41
42
|
* @type {boolean}
|
|
42
43
|
*/
|
|
43
44
|
audioSource?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Optional flag to immediately connect to the session
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
*/
|
|
49
|
+
immediatelyJoin?: boolean;
|
|
44
50
|
}
|
|
45
51
|
export interface IAvaturnHead {
|
|
46
52
|
/**
|
|
@@ -63,6 +69,16 @@ export interface IAvaturnHead {
|
|
|
63
69
|
* @returns {Promise<unknown>} A promise that resolves after initialization is complete and avatar is ready to use.
|
|
64
70
|
*/
|
|
65
71
|
init(): Promise<unknown>;
|
|
72
|
+
setOutputDevice(device: {
|
|
73
|
+
outputDeviceId?: string;
|
|
74
|
+
}): Promise<DailyDeviceInfos>;
|
|
75
|
+
setInputDevices(devices: {
|
|
76
|
+
audioDeviceId: string | false | null;
|
|
77
|
+
videoDeviceId: string | false | null;
|
|
78
|
+
}): Promise<DailyDeviceInfos>;
|
|
79
|
+
requestMediaDevices(): Promise<{
|
|
80
|
+
devices: MediaDeviceInfo[];
|
|
81
|
+
}>;
|
|
66
82
|
updateConfig(): void;
|
|
67
83
|
/**
|
|
68
84
|
* Executes a task with the provided text.
|