mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
working prototype
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
|
||||
export let numBars = 16;
|
||||
export let stream_state: "open" | "closed" = "closed";
|
||||
export let stream_state: "open" | "closed" | "waiting" = "closed";
|
||||
export let audio_source: HTMLAudioElement;
|
||||
|
||||
let audioContext: AudioContext;
|
||||
@@ -69,17 +69,12 @@
|
||||
{#each Array(numBars) as _}
|
||||
<div class="box"></div>
|
||||
{/each}
|
||||
</div>
|
||||
<button class="muteButton" on:click={toggleMute}>
|
||||
{is_muted ? '🔈' : '🔊'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.waveContainer {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -98,15 +93,4 @@
|
||||
border-radius: 8px;
|
||||
transition: transform 0.05s ease;
|
||||
}
|
||||
|
||||
.muteButton {
|
||||
margin-top: 10px;
|
||||
padding: 10px 20px;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user