Skip to content

Commit

Permalink
add recording status command (#32)
Browse files Browse the repository at this point in the history
Thanks
  • Loading branch information
lukitsche committed Feb 16, 2024
1 parent 1849417 commit f10dc3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ obs-cmd scene-collection switch <collection>
obs-cmd scene-item toggle <scene> <item>
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
Expand Down
1 change: 1 addition & 0 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub enum Recording {
Start,
Stop,
Toggle,
Status,
}

#[derive(Parser)]
Expand Down
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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);
}
}
}
}

Expand Down

0 comments on commit f10dc3c

Please sign in to comment.