mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +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> {
|
async function toggleAccompaniment(): Promise<void> {
|
||||||
if (accompanimentActive.value) {
|
|
||||||
await stopAccompaniment();
|
|
||||||
showToast(t("accompanimentStopped"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
|
if (accompanimentActive.value) {
|
||||||
|
await stopAccompaniment();
|
||||||
|
showToast(t("accompanimentStopped"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
await startAccompaniment();
|
await startAccompaniment();
|
||||||
showToast(t("accompanimentStarted"));
|
if (accompanimentActive.value) showToast(t("accompanimentStarted"));
|
||||||
} catch {
|
} catch {
|
||||||
const messageKey = accompanimentErrorCode.value === "needsWebRtc"
|
const messageKey = accompanimentErrorCode.value === "needsWebRtc"
|
||||||
? "accompanimentNeedsWebRtc"
|
? "accompanimentNeedsWebRtc"
|
||||||
|
|||||||
Reference in new issue
Block a user