Skip to content

Commit

Permalink
Expose recording pause & resume commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mtratsiuk committed Oct 6, 2024
1 parent da928d5 commit f769ecd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ obs-cmd scene switch @cam-front
obs-cmd scene-collection switch <collection>
obs-cmd scene-item toggle <scene> <item>
obs-cmd toggle-mute Mic/Aux
obs-cmd recording start
obs-cmd recording stop
obs-cmd recording toggle
obs-cmd recording pause
obs-cmd recording resume
obs-cmd recording toggle-pause
obs-cmd recording status
obs-cmd streaming start
Expand Down
2 changes: 2 additions & 0 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ pub enum Recording {
Stop,
Toggle,
Status,
Pause,
Resume,
TogglePause,
}

Expand Down
10 changes: 10 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Bytes: {:?}", status.bytes);
}
}
Pause => {
let res = client.recording().pause().await;
println!("Recording paused");
println!("Result: {:?}", res);
}
Resume => {
let res = client.recording().resume().await;
println!("Recording resumed");
println!("Result: {:?}", res);
}
TogglePause => {
let res = client.recording().toggle_pause().await;
println!("Recording pause toggled");
Expand Down

0 comments on commit f769ecd

Please sign in to comment.