@w0nna_dev/lina-widget 1.2.1 → 1.2.3
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/lina-widget.es.js +9025 -9117
- package/dist/lina-widget.umd.js +188 -188
- package/dist/src/lina/components/LinaWidget.d.ts +3 -0
- package/dist/src/orb/core/SoundManager.d.ts +6 -37
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ export declare class LinaWidget extends LitElement {
|
|
|
19
19
|
btnStartText: string;
|
|
20
20
|
btnEndText: string;
|
|
21
21
|
colors: Partial<LinaColors>;
|
|
22
|
+
soundsEnabled: boolean;
|
|
23
|
+
soundsVolume: number;
|
|
22
24
|
brandingLogoColor: string;
|
|
23
25
|
brandingTitleColor: string;
|
|
24
26
|
brandingDividerColor: string;
|
|
@@ -32,6 +34,7 @@ export declare class LinaWidget extends LitElement {
|
|
|
32
34
|
connectedCallback(): void;
|
|
33
35
|
disconnectedCallback(): void;
|
|
34
36
|
firstUpdated(): void;
|
|
37
|
+
private initializeSoundManager;
|
|
35
38
|
private checkMicrophonePermission;
|
|
36
39
|
private initializeOrb;
|
|
37
40
|
private initializeCallManager;
|
|
@@ -1,55 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SoundManager -
|
|
3
|
-
* Uses
|
|
2
|
+
* SoundManager - Sound effects for call events
|
|
3
|
+
* Uses embedded base64 audio for portability (works in npm packages without external files)
|
|
4
4
|
*/
|
|
5
5
|
export interface SoundConfig {
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
volume: number;
|
|
8
8
|
}
|
|
9
9
|
export declare class SoundManager {
|
|
10
|
-
private audioContext;
|
|
11
10
|
private config;
|
|
11
|
+
private connectAudio;
|
|
12
|
+
private disconnectAudio;
|
|
12
13
|
constructor(config?: Partial<SoundConfig>);
|
|
13
|
-
|
|
14
|
-
* Initialize audio context (must be called from user interaction)
|
|
15
|
-
*/
|
|
16
|
-
private ensureContext;
|
|
17
|
-
/**
|
|
18
|
-
* Create an oscillator with envelope
|
|
19
|
-
*/
|
|
20
|
-
private createTone;
|
|
21
|
-
/**
|
|
22
|
-
* Play ascending melodic sound for call start
|
|
23
|
-
* C4 → E4 → G4 (C major chord arpeggio)
|
|
24
|
-
*/
|
|
14
|
+
private initAudio;
|
|
25
15
|
playCallStartSound(): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Play descending melodic sound for call end
|
|
28
|
-
* G4 → E4 → C4 (descending C major arpeggio)
|
|
29
|
-
*/
|
|
30
16
|
playCallEndSound(): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Update configuration
|
|
33
|
-
*/
|
|
34
17
|
setConfig(config: Partial<SoundConfig>): void;
|
|
35
|
-
/**
|
|
36
|
-
* Enable or disable sounds
|
|
37
|
-
*/
|
|
38
18
|
setEnabled(enabled: boolean): void;
|
|
39
|
-
/**
|
|
40
|
-
* Set volume (0.0 - 1.0)
|
|
41
|
-
*/
|
|
42
19
|
setVolume(volume: number): void;
|
|
43
|
-
/**
|
|
44
|
-
* Get current config
|
|
45
|
-
*/
|
|
46
20
|
getConfig(): SoundConfig;
|
|
47
|
-
/**
|
|
48
|
-
* Check if sounds are enabled
|
|
49
|
-
*/
|
|
50
21
|
isEnabled(): boolean;
|
|
51
|
-
|
|
52
|
-
* Cleanup
|
|
53
|
-
*/
|
|
22
|
+
prewarm(): Promise<void>;
|
|
54
23
|
destroy(): void;
|
|
55
24
|
}
|