chore: dispatch starting_recording and stop_recording. (#342)

Co-authored-by: Ming Xu <albertxu@amazon.com>
This commit is contained in:
AlbertMingXu
2025-06-10 06:36:32 +08:00
committed by GitHub
parent 6875d6610a
commit 8780265659
4 changed files with 12 additions and 1 deletions

View File

@@ -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;