hanc-webrtc-widgets 2.2.0 → 2.2.2
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 +65 -0
- package/dist/hanc-webrtc-widgets.es.js +1067 -1031
- package/dist/hanc-webrtc-widgets.umd.js +32 -32
- package/dist/src/components/floating-call/floating-call.d.ts +2 -1
- package/dist/src/components/inline-call/inline-call.d.ts +2 -1
- package/dist/src/components/pill-call/pill-call.d.ts +2 -1
- package/dist/src/core/orb/SoundManager.d.ts +18 -33
- package/dist/src/core/orb/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { OrbColors } from '../../core/orb';
|
|
2
|
+
import { OrbColors, SoundPreset } from '../../core/orb';
|
|
3
3
|
export declare class FloatingCall extends LitElement {
|
|
4
4
|
static styles: import('lit').CSSResult;
|
|
5
5
|
private callManager;
|
|
@@ -32,6 +32,7 @@ export declare class FloatingCall extends LitElement {
|
|
|
32
32
|
colorContrast: number;
|
|
33
33
|
soundEnabled: boolean;
|
|
34
34
|
soundVolume: number;
|
|
35
|
+
soundPreset: SoundPreset;
|
|
35
36
|
connectedCallback(): void;
|
|
36
37
|
disconnectedCallback(): void;
|
|
37
38
|
firstUpdated(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { OrbColors } from '../../core/orb';
|
|
2
|
+
import { OrbColors, SoundPreset } from '../../core/orb';
|
|
3
3
|
export declare class InlineCall extends LitElement {
|
|
4
4
|
static styles: import('lit').CSSResult;
|
|
5
5
|
private callManager;
|
|
@@ -32,6 +32,7 @@ export declare class InlineCall extends LitElement {
|
|
|
32
32
|
colorContrast: number;
|
|
33
33
|
soundEnabled: boolean;
|
|
34
34
|
soundVolume: number;
|
|
35
|
+
soundPreset: SoundPreset;
|
|
35
36
|
connectedCallback(): void;
|
|
36
37
|
disconnectedCallback(): void;
|
|
37
38
|
firstUpdated(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { OrbColors } from '../../core/orb';
|
|
2
|
+
import { OrbColors, SoundPreset } from '../../core/orb';
|
|
3
3
|
export declare class PillCall extends LitElement {
|
|
4
4
|
static styles: import('lit').CSSResult;
|
|
5
5
|
private callManager;
|
|
@@ -32,6 +32,7 @@ export declare class PillCall extends LitElement {
|
|
|
32
32
|
colorContrast: number;
|
|
33
33
|
soundEnabled: boolean;
|
|
34
34
|
soundVolume: number;
|
|
35
|
+
soundPreset: SoundPreset;
|
|
35
36
|
connectedCallback(): void;
|
|
36
37
|
disconnectedCallback(): void;
|
|
37
38
|
firstUpdated(): void;
|
|
@@ -1,60 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SoundManager -
|
|
3
|
-
* Uses Web Audio API
|
|
2
|
+
* SoundManager - Professional notification sound synthesis
|
|
3
|
+
* Uses Web Audio API with creative sound design techniques
|
|
4
4
|
*/
|
|
5
|
+
export type SoundPreset = '1' | '2' | '3' | '4' | 'none';
|
|
5
6
|
export interface SoundConfig {
|
|
6
7
|
enabled: boolean;
|
|
7
8
|
volume: number;
|
|
9
|
+
preset: SoundPreset;
|
|
8
10
|
}
|
|
9
11
|
export declare class SoundManager {
|
|
10
12
|
private audioContext;
|
|
11
13
|
private config;
|
|
12
14
|
constructor(config?: Partial<SoundConfig>);
|
|
13
|
-
/**
|
|
14
|
-
* Initialize audio context (must be called from user interaction)
|
|
15
|
-
*/
|
|
16
15
|
private ensureContext;
|
|
17
|
-
/**
|
|
18
|
-
* Prewarm audio context on user interaction
|
|
19
|
-
* This helps avoid audio context suspension issues
|
|
20
|
-
*/
|
|
21
16
|
prewarm(): Promise<void>;
|
|
22
17
|
/**
|
|
23
|
-
*
|
|
18
|
+
* Preset 1: Drop - Капля
|
|
19
|
+
* Мягкий звук с pitch drop, как капля воды
|
|
24
20
|
*/
|
|
25
|
-
private
|
|
21
|
+
private playDrop;
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
23
|
+
* Preset 2: Glass Tap - Стеклянный тап
|
|
24
|
+
* Чистый высокий звук с коротким резонансом
|
|
29
25
|
*/
|
|
30
|
-
|
|
26
|
+
private playGlassTap;
|
|
31
27
|
/**
|
|
32
|
-
*
|
|
33
|
-
* Single soft tone
|
|
28
|
+
* Preset 3: Soft Whoosh - Airy swoosh sound
|
|
34
29
|
*/
|
|
35
|
-
|
|
30
|
+
private playWhoosh;
|
|
36
31
|
/**
|
|
37
|
-
*
|
|
32
|
+
* Preset 4: Gentle Note - Нежная нота
|
|
33
|
+
* Одна мягкая музыкальная нота
|
|
38
34
|
*/
|
|
35
|
+
private playGentleNote;
|
|
36
|
+
playCallStartSound(): Promise<void>;
|
|
37
|
+
playCallEndSound(): Promise<void>;
|
|
39
38
|
setConfig(config: Partial<SoundConfig>): void;
|
|
40
|
-
/**
|
|
41
|
-
* Enable or disable sounds
|
|
42
|
-
*/
|
|
43
39
|
setEnabled(enabled: boolean): void;
|
|
44
|
-
/**
|
|
45
|
-
* Set volume (0.0 - 1.0)
|
|
46
|
-
*/
|
|
47
40
|
setVolume(volume: number): void;
|
|
48
|
-
|
|
49
|
-
* Get current config
|
|
50
|
-
*/
|
|
41
|
+
setPreset(preset: SoundPreset): void;
|
|
51
42
|
getConfig(): SoundConfig;
|
|
52
|
-
/**
|
|
53
|
-
* Check if sounds are enabled
|
|
54
|
-
*/
|
|
55
43
|
isEnabled(): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Cleanup
|
|
58
|
-
*/
|
|
59
44
|
destroy(): void;
|
|
60
45
|
}
|
|
@@ -3,7 +3,7 @@ export type { OrbConfig, OrbColors } from './OrbRenderer';
|
|
|
3
3
|
export { AudioAnalyzer } from './AudioAnalyzer';
|
|
4
4
|
export type { AudioData, AudioAnalyzerOptions } from './AudioAnalyzer';
|
|
5
5
|
export { SoundManager } from './SoundManager';
|
|
6
|
-
export type { SoundConfig } from './SoundManager';
|
|
6
|
+
export type { SoundConfig, SoundPreset } from './SoundManager';
|
|
7
7
|
export { darkPresets, lightPresets, getColorPreset, getPresetNames } from './colorPresets';
|
|
8
8
|
export { themes, darkThemes, lightThemes, getTheme, getThemeNames, applyTheme, detectSystemTheme, watchSystemTheme } from './themes';
|
|
9
9
|
export type { ThemeConfig, Theme } from './themes';
|