Crates.io | obws |
lib.rs | obws |
version | |
source | src |
created_at | 2020-12-27 13:57:51.672856 |
updated_at | 2025-01-01 16:44:34.16302 |
description | The obws (obvious) remote control library for OBS. |
homepage | https://github.com/dnaka91/obws |
repository | https://github.com/dnaka91/obws |
max_upload_size | |
id | 327837 |
Cargo.toml error: | TOML parse error at line 27, column 1 | 27 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Remote control OBS with the obs-websocket plugin from Rust 🦀.
Add obws
to your project with cargo add obws@0.14.0
or add it manually to your
Cargo.toml
:
[dependencies]
obws = "0.14.0"
In addition, you will need to use the latest tokio runtime to use this library as it makes heavy use of async/await and is bound to this runtime.
Here we connect to a OBS instance, get some version information and log in to access the whole API and lastly print out a list of available scenes.
For more usage instructions see the docs or check out the examples.
use anyhow::Result;
use obws::Client;
#[tokio::main]
async fn main() -> Result<()> {
// Connect to the OBS instance through obs-websocket.
let client = Client::connect("localhost", 4455, Some("password")).await?;
// Get and print out version information of OBS and obs-websocket.
let version = client.general().version().await?;
println!("{version:#?}");
// Get a list of available scenes and print them out.
let scene_list = client.scenes().list().await?;
println!("{scene_list:#?}");
Ok(())
}
This project is licensed under MIT License (or http://opensource.org/licenses/MIT).