@hubtalk-ai/web-sdk 0.2.0 → 0.3.1
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/README.md +274 -411
- package/README.ru.md +338 -0
- package/dist/errors.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +256 -152
- package/dist/types.d.ts +13 -1
- package/dist/voice-client.bundle.js +6 -6
- package/dist/voice-client.d.ts +18 -0
- package/dist/widget-avatar.d.ts +7 -0
- package/dist/widget.bundle.js +267 -0
- package/dist/widget.css +597 -0
- package/dist/widget.d.ts +40 -0
- package/dist/widget.js +787 -0
- package/package.json +20 -7
package/dist/voice-client.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare class VoiceClient {
|
|
|
9
9
|
private room;
|
|
10
10
|
private callId;
|
|
11
11
|
private playAudio;
|
|
12
|
+
private agentVideoTrack;
|
|
13
|
+
private readonly agentVideoElements;
|
|
14
|
+
private microphoneEnabled;
|
|
15
|
+
private microphoneOperation;
|
|
12
16
|
private stoppingLocally;
|
|
13
17
|
private reconnectSeen;
|
|
14
18
|
private destroyed;
|
|
@@ -45,6 +49,16 @@ export declare class VoiceClient {
|
|
|
45
49
|
private connectRoom;
|
|
46
50
|
private abandonConnectingCall;
|
|
47
51
|
private publishMicrophone;
|
|
52
|
+
isMicrophoneEnabled(): boolean;
|
|
53
|
+
setMicrophoneEnabled(enabled: boolean): Promise<void>;
|
|
54
|
+
resumeAudio(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* VPT-857 §1.3: attach the avatar worker's current and any later video
|
|
57
|
+
* track to `element`; the returned function detaches. Outside a call it
|
|
58
|
+
* attaches nothing and returns a no-op detach.
|
|
59
|
+
*/
|
|
60
|
+
attachAgentVideo(element: HTMLVideoElement): () => void;
|
|
61
|
+
private confirmMicrophone;
|
|
48
62
|
/**
|
|
49
63
|
* Отправляет текстовую реплику посетителя в разговор (VPT-108 §2.1).
|
|
50
64
|
* Своё сообщение в чат SDK не кладёт — его вернёт агент событием
|
|
@@ -76,6 +90,10 @@ export declare class VoiceClient {
|
|
|
76
90
|
private handleDisconnected;
|
|
77
91
|
private teardownRoom;
|
|
78
92
|
private syncAgentState;
|
|
93
|
+
/** The subscribed video track of the avatar worker, if any (§1.3). */
|
|
94
|
+
private findAgentVideoTrack;
|
|
95
|
+
private syncAgentVideo;
|
|
96
|
+
private setAgentVideoTrack;
|
|
79
97
|
private setConnectionState;
|
|
80
98
|
private setAgentState;
|
|
81
99
|
/** Переводит ось соединения (если нужно), логирует и эмитит error (§1.4);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VoiceClient } from './voice-client';
|
|
2
|
+
import type { AvatarMedia } from './widget';
|
|
3
|
+
export declare function mountAvatar(root: HTMLElement, media: AvatarMedia, client: VoiceClient, start: () => Promise<void>, showPanel: () => void): {
|
|
4
|
+
reposition: () => void;
|
|
5
|
+
update(pending: boolean, audioCall: boolean): void;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
};
|