mirror of
https://github.com/dnaka91/obws
synced 2024-11-13 19:12:03 +00:00
Change to new default port
This commit is contained in:
parent
4550724a70
commit
19c0c6042a
@ -48,7 +48,7 @@ use obws::Client;
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
/// Connect to the OBS instance through obs-websocket.
|
||||
let client = Client::connect("localhost", 4444, Some("password")).await?;
|
||||
let client = Client::connect("localhost", 4455, Some("password")).await?;
|
||||
|
||||
/// Get and print out version information of OBS and obs-websocket.
|
||||
let version = client.general().get_version().await?;
|
||||
|
@ -11,7 +11,7 @@ async fn main() -> Result<()> {
|
||||
env::set_var("RUST_LOG", "obws=debug");
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
|
||||
let client = Client::connect("localhost",4455, env::var("OBS_PASSWORD").ok()).await?;
|
||||
|
||||
let events = client.events()?;
|
||||
pin_mut!(events);
|
||||
|
@ -10,7 +10,7 @@ async fn main() -> Result<()> {
|
||||
env::set_var("RUST_LOG", "obws=debug");
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
|
||||
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
|
||||
|
||||
let scene_list = client.scenes().get_scene_list().await?;
|
||||
|
||||
|
@ -11,7 +11,7 @@ async fn main() -> Result<()> {
|
||||
env::set_var("RUST_LOG", "obws=debug");
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
|
||||
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
|
||||
|
||||
let screenshot = client
|
||||
.sources()
|
||||
|
@ -10,7 +10,7 @@ async fn main() -> Result<()> {
|
||||
env::set_var("RUST_LOG", "obws=debug");
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
|
||||
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
|
||||
|
||||
let version = client.general().get_version().await?;
|
||||
println!("{:#?}", version);
|
||||
|
@ -13,7 +13,7 @@
|
||||
//! #[tokio::main]
|
||||
//! async fn main() -> Result<()> {
|
||||
//! /// Connect to the OBS instance through obs-websocket.
|
||||
//! let client = Client::connect("localhost", 4444, Some("password")).await?;
|
||||
//! let client = Client::connect("localhost", 4455, Some("password")).await?;
|
||||
//!
|
||||
//! /// Get and print out version information of OBS and obs-websocket.
|
||||
//! let version = client.general().get_version().await?;
|
||||
|
@ -31,7 +31,7 @@ pub async fn new_client() -> Result<Client> {
|
||||
let host = env::var("OBS_HOST").unwrap_or_else(|_| "localhost".to_owned());
|
||||
let port = env::var("OBS_PORT")
|
||||
.map(|p| p.parse())
|
||||
.unwrap_or(Ok(4444))?;
|
||||
.unwrap_or(Ok(4455))?;
|
||||
let client = Client::connect(host, port, env::var("OBS_PASSWORD").ok()).await?;
|
||||
|
||||
ensure_obs_setup(&client).await?;
|
||||
|
Loading…
Reference in New Issue
Block a user