Skip to content

Commit da928d5

Browse files
committed
Expose toggle-pause command, closes #51
1 parent 64a41fd commit da928d5

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "obs-cmd"
3-
version = "0.17.7"
3+
version = "0.17.8"
44
edition = "2021"
55
description = "A minimal command to control obs via obs-websocket"
66
authors = ["Luigi Maselli <[email protected]>"]

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ obs-cmd scene-collection switch <collection>
1616
obs-cmd scene-item toggle <scene> <item>
1717
obs-cmd toggle-mute Mic/Aux
1818
obs-cmd recording toggle
19+
obs-cmd recording toggle-pause
1920
obs-cmd recording status
2021
obs-cmd streaming start
2122
obs-cmd virtualcam start
@@ -30,7 +31,7 @@ obs-cmd --websocket obsws://localhost:4455/secret info # You can override the de
3031

3132
You can override the websocket URL, which can be found in OBS -> Tools -> WebSocket Server Settings. `localhost` for the hostname will work for most, instead of the full IP address. If you set the password as `secret` you can avoid to specify the `--websocket` argument.
3233

33-
### Installation
34+
### Installation
3435

3536

3637
### Using the provided Binaries
@@ -64,7 +65,7 @@ sudo cp target/release/obs-cmd /usr/local/bin/obs-cmd
6465
```
6566

6667
### Installing on Arch Linux
67-
The `obs-cmd` package is maintained on the [Arch User Repository](https://aur.archlinux.org/packages/obs-cmd).
68+
The `obs-cmd` package is maintained on the [Arch User Repository](https://aur.archlinux.org/packages/obs-cmd).
6869

6970
Ensure that [rust](https://archlinux.org/packages/extra/x86_64/rust/) is installed for access to `cargo`.
7071

@@ -96,10 +97,10 @@ sudo pacman -U obs-cmd-0.15.3-1-x86_64.pkg.tar.zst
9697

9798
### Example Usage
9899
```
99-
$ obs-cmd recording start
100+
$ obs-cmd recording start
100101
Recording started
101102
Result: Ok(())
102-
$ obs-cmd recording stop
103+
$ obs-cmd recording stop
103104
104105
$ obs-cmd info
105106
Version: Version { obs_version: Version { major: 29, minor: 1, patch: 1 }, obs_web_socket_version: Version { major: 5, minor: 2, patch: 2 }, rpc_version: 1, available_requests: ..

src/command.rs

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub enum Recording {
8484
Stop,
8585
Toggle,
8686
Status,
87+
TogglePause,
8788
}
8889

8990
#[derive(Parser)]

src/main.rs

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7575
println!("Bytes: {:?}", status.bytes);
7676
}
7777
}
78+
TogglePause => {
79+
let res = client.recording().toggle_pause().await;
80+
println!("Recording pause toggled");
81+
println!("Result: {:?}", res);
82+
}
7883
}
7984
}
8085

0 commit comments

Comments
 (0)