Customizable icon also fix a bug where you could not import the lib without silero (#39)

* commit

* Add code

* Add docs
This commit is contained in:
Freddy Boulton
2024-12-13 16:53:35 -08:00
committed by GitHub
parent b97712bc0d
commit e92efb1c7d
8 changed files with 229 additions and 71 deletions

View File

@@ -18,6 +18,9 @@
export let rtc_configuration: Object | null = null;
export let i18n: I18nFormatter;
export let on_change_cb: (msg: "change" | "tick") => void;
export let icon: string | undefined = undefined;
export let icon_button_color: string = "var(--color-accent)";
export let pulse_color: string = "var(--color-accent)";
export let server: {
offer: (body: any) => Promise<any>;
@@ -103,7 +106,7 @@
/>
{#if value !== "__webrtc_value__"}
<div class="audio-container">
<AudioWave audio_source_callback={() => audio_player.srcObject} {stream_state}/>
<AudioWave audio_source_callback={() => audio_player.srcObject} {stream_state} {icon} {icon_button_color} {pulse_color}/>
</div>
{/if}
{#if value === "__webrtc_value__"}