mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
changes (#1828)
This commit is contained in:
parent
e7e8b6333c
commit
597d22e7b0
@ -53,6 +53,7 @@
|
|||||||
export let status: "complete" | "pending" | "error";
|
export let status: "complete" | "pending" | "error";
|
||||||
export let scroll_to_output: boolean = false;
|
export let scroll_to_output: boolean = false;
|
||||||
export let timer: boolean = true;
|
export let timer: boolean = true;
|
||||||
|
export let visible: boolean = true;
|
||||||
|
|
||||||
let el: HTMLDivElement;
|
let el: HTMLDivElement;
|
||||||
|
|
||||||
@ -120,6 +121,7 @@
|
|||||||
<div
|
<div
|
||||||
class="wrap"
|
class="wrap"
|
||||||
class:opacity-0={!status || status === "complete"}
|
class:opacity-0={!status || status === "complete"}
|
||||||
|
class:!hidden={!visible}
|
||||||
bind:this={el}
|
bind:this={el}
|
||||||
>
|
>
|
||||||
{#if status === "pending"}
|
{#if status === "pending"}
|
||||||
|
@ -69,14 +69,14 @@
|
|||||||
recording = false;
|
recording = false;
|
||||||
}
|
}
|
||||||
audio_blob = new Blob(audio_chunks, { type: "audio/wav" });
|
audio_blob = new Blob(audio_chunks, { type: "audio/wav" });
|
||||||
|
audio_chunks = [];
|
||||||
value = {
|
value = {
|
||||||
data: await blob_to_data_url(audio_blob),
|
data: await blob_to_data_url(audio_blob),
|
||||||
name
|
name
|
||||||
};
|
};
|
||||||
dispatch(streaming ? "stream" : "change", value);
|
dispatch(streaming ? "stream" : "change", value);
|
||||||
const audioTracks = stream.getAudioTracks();
|
|
||||||
audioTracks.forEach((track) => track.stop());
|
|
||||||
});
|
});
|
||||||
|
inited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function record() {
|
async function record() {
|
||||||
|
Loading…
Reference in New Issue
Block a user