mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Tidy up connection logic (#90)
* Add code: * code * code --------- Co-authored-by: Freddy Boulton <freddyboulton@hf-freddy.local>
This commit is contained in:
@@ -154,6 +154,13 @@
|
||||
_time_limit = null;
|
||||
stop(pc);
|
||||
break;
|
||||
case "failed":
|
||||
console.info("failed");
|
||||
stream_state = "closed";
|
||||
_time_limit = null;
|
||||
dispatch("error", "Connection failed!");
|
||||
stop(pc);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -209,6 +216,7 @@
|
||||
})
|
||||
.catch(() => {
|
||||
console.info("catching");
|
||||
clearTimeout(timeoutId);
|
||||
stream_state = "closed";
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user