mirror of https://github.com/jetkvm/kvm.git
[WIP] Updates: support in-process mode
This commit is contained in:
parent
00b8da45d9
commit
035ba4c35f
|
|
@ -47,7 +47,7 @@ export default function SettingsAudioRoute() {
|
||||||
}, [send]);
|
}, [send]);
|
||||||
|
|
||||||
const handleAudioOutputSourceChange = (source: string) => {
|
const handleAudioOutputSourceChange = (source: string) => {
|
||||||
send("setAudioOutputSource", { params: { source } }, (resp: JsonRpcResponse) => {
|
send("setAudioOutputSource", { source }, (resp: JsonRpcResponse) => {
|
||||||
if ("error" in resp) {
|
if ("error" in resp) {
|
||||||
notifications.error(
|
notifications.error(
|
||||||
`Failed to set audio output source: ${resp.error.data || "Unknown error"}`,
|
`Failed to set audio output source: ${resp.error.data || "Unknown error"}`,
|
||||||
|
|
@ -60,7 +60,7 @@ export default function SettingsAudioRoute() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAudioModeChange = (mode: string) => {
|
const handleAudioModeChange = (mode: string) => {
|
||||||
send("setAudioMode", { params: { mode } }, (resp: JsonRpcResponse) => {
|
send("setAudioMode", { mode }, (resp: JsonRpcResponse) => {
|
||||||
if ("error" in resp) {
|
if ("error" in resp) {
|
||||||
notifications.error(
|
notifications.error(
|
||||||
`Failed to set audio mode: ${resp.error.data || "Unknown error"}`,
|
`Failed to set audio mode: ${resp.error.data || "Unknown error"}`,
|
||||||
|
|
@ -73,7 +73,7 @@ export default function SettingsAudioRoute() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAudioOutputEnabledChange = (enabled: boolean) => {
|
const handleAudioOutputEnabledChange = (enabled: boolean) => {
|
||||||
send("setAudioOutputEnabled", { params: { enabled } }, (resp: JsonRpcResponse) => {
|
send("setAudioOutputEnabled", { enabled }, (resp: JsonRpcResponse) => {
|
||||||
if ("error" in resp) {
|
if ("error" in resp) {
|
||||||
notifications.error(
|
notifications.error(
|
||||||
`Failed to ${enabled ? "enable" : "disable"} audio output: ${resp.error.data || "Unknown error"}`,
|
`Failed to ${enabled ? "enable" : "disable"} audio output: ${resp.error.data || "Unknown error"}`,
|
||||||
|
|
@ -86,7 +86,7 @@ export default function SettingsAudioRoute() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAudioInputEnabledChange = (enabled: boolean) => {
|
const handleAudioInputEnabledChange = (enabled: boolean) => {
|
||||||
send("setAudioInputEnabled", { params: { enabled } }, (resp: JsonRpcResponse) => {
|
send("setAudioInputEnabled", { enabled }, (resp: JsonRpcResponse) => {
|
||||||
if ("error" in resp) {
|
if ("error" in resp) {
|
||||||
notifications.error(
|
notifications.error(
|
||||||
`Failed to ${enabled ? "enable" : "disable"} audio input: ${resp.error.data || "Unknown error"}`,
|
`Failed to ${enabled ? "enable" : "disable"} audio input: ${resp.error.data || "Unknown error"}`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue