mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-01 02:52:49 +08:00
fix: handle canceled accompaniment sharing
This commit is contained in:
1 parent
0986c65551
commit
d42e7a033c
1 file changed
+6
-6
@@ -1394,14 +1394,14 @@ function toggleMicrophone(): void {
|
||||
}
|
||||
|
||||
async function toggleAccompaniment(): Promise<void> {
|
||||
if (accompanimentActive.value) {
|
||||
await stopAccompaniment();
|
||||
showToast(t("accompanimentStopped"));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (accompanimentActive.value) {
|
||||
await stopAccompaniment();
|
||||
showToast(t("accompanimentStopped"));
|
||||
return;
|
||||
}
|
||||
await startAccompaniment();
|
||||
showToast(t("accompanimentStarted"));
|
||||
if (accompanimentActive.value) showToast(t("accompanimentStarted"));
|
||||
} catch {
|
||||
const messageKey = accompanimentErrorCode.value === "needsWebRtc"
|
||||
? "accompanimentNeedsWebRtc"
|
||||
|
||||
Reference in new issue
Block a user