diff --git a/README.md b/README.md index a94e164..1da04f2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ obs-cmd scene-collection switch obs-cmd scene-item toggle obs-cmd toggle-mute Mic/Aux obs-cmd recording toggle +obs-cmd recording status obs-cmd streaming start obs-cmd virtualcam start obs-cmd replay toggle diff --git a/src/command.rs b/src/command.rs index 445e16f..4a66fa3 100644 --- a/src/command.rs +++ b/src/command.rs @@ -79,6 +79,7 @@ pub enum Recording { Start, Stop, Toggle, + Status, } #[derive(Parser)] diff --git a/src/main.rs b/src/main.rs index 713e2a6..a786483 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,6 +65,15 @@ async fn main() -> Result<(), Box> { println!("Recording toggled"); println!("Result: {:?}", res); } + Status => { + let status = client.recording().status().await?; + println!("Recording: {:?}", status.active); + if status.active { + println!("Paused: {:?}", status.paused); + println!("Timecode: {:?}", status.timecode); + println!("Bytes: {:?}", status.bytes); + } + } } }