Skip to content

Commit

Permalink
Add command to get current audio output (#11)
Browse files Browse the repository at this point in the history
* support for get audio output list

* fix for audio output name command
  • Loading branch information
MrSpock authored Jan 13, 2025
1 parent e28b152 commit 3bb5b88
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub enum Command {
Turn3DOff,
GetServicesList,
Launch(String, Value),
GetAudioOutput,
}

#[derive(Debug)]
Expand Down Expand Up @@ -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,
},
}
}

0 comments on commit 3bb5b88

Please sign in to comment.