From 3bb5b88d7eefcb3821f4668ef8f25308fca44dba Mon Sep 17 00:00:00 2001 From: Marcin Jurczuk Date: Mon, 13 Jan 2025 09:41:12 +0100 Subject: [PATCH] Add command to get current audio output (#11) * support for get audio output list * fix for audio output name command --- src/command/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/command/mod.rs b/src/command/mod.rs index 7fde9cf7..b9dec217 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -38,6 +38,7 @@ pub enum Command { Turn3DOff, GetServicesList, Launch(String, Value), + GetAudioOutput, } #[derive(Debug)] @@ -210,5 +211,11 @@ pub fn create_command(id: String, cmd: Command) -> CommandRequest { uri: String::from("ssap://system.launcher/launch"), payload: Some(json!({ "id": app_id, "params": params })), }, + Command::GetAudioOutput => CommandRequest { + id, + r#type: String::from("request"), + uri: String::from("ssap://audio/getSoundOutput"), + payload: None, + }, } }