mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
chore: dispatch starting_recording and stop_recording. (#342)
Co-authored-by: Ming Xu <albertxu@amazon.com>
This commit is contained in:
@@ -146,6 +146,7 @@
|
||||
|
||||
async function start_webrtc(): Promise<void> {
|
||||
if (stream_state === "closed") {
|
||||
dispatch("start_recording");
|
||||
await server.turn().then((rtc_configuration_) => {
|
||||
if (rtc_configuration_.error) {
|
||||
dispatch("error", rtc_configuration_.error);
|
||||
@@ -207,6 +208,7 @@
|
||||
stream_state = "closed";
|
||||
});
|
||||
} else {
|
||||
dispatch("stop_recording");
|
||||
stop(pc);
|
||||
stream_state = "closed";
|
||||
_time_limit = null;
|
||||
|
||||
Reference in New Issue
Block a user