Compare commits

...

4 Commits

Author SHA1 Message Date
Dominik Nakamura bb087cc755
Bump up version number to 0.11.5 9 months ago
Dominik Nakamura 1849faf146
Prepare changelog for next release 9 months ago
Dominik Nakamura 61d85c85e9
Disable events if the event feature is disabled
By default obs-websocket sends all possible events (except high
velocity). But there's no need to receive events if the feature isn't
enabled in this library.
9 months ago
Dominik Nakamura b080429b2f
Handle event messages even without `event` feature
An error message was logged when receiving events from obs-websocket,
when the `events` feature was NOT enabled.
9 months ago

@ -10,6 +10,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## [Unreleased] - ReleaseDate
## [0.11.5] - 2023-09-04
### Changed
- Explicitly unsubscribe from all events when the `events` feature isn't enabled. By default, `obs-websocket` sends all possible events, but those are not needed without the events feature flag in obws.
### Fixed
- Any received event from `obs-websocket` was wrongly reported as error level log while the `events` feature flag wasn't enabled in `obws`. These are now handled properly and logged as trace level log.
## [0.11.4] - 2023-08-23
### Changed
@ -244,7 +254,8 @@ is currently in progress on the `v5-api` branch and the release is expected to b
- Initial release.
<!-- next-url -->
[Unreleased]: https://github.com/dnaka91/obws/compare/v0.11.4...HEAD
[Unreleased]: https://github.com/dnaka91/obws/compare/v0.11.5...HEAD
[0.11.5]: https://github.com/dnaka91/obws/compare/v0.11.4...v0.11.5
[0.11.4]: https://github.com/dnaka91/obws/compare/v0.11.3...v0.11.4
[0.11.3]: https://github.com/dnaka91/obws/compare/v0.11.2...v0.11.3
[0.11.2]: https://github.com/dnaka91/obws/compare/v0.11.1...v0.11.2

@ -1,6 +1,6 @@
[package]
name = "obws"
version = "0.11.4"
version = "0.11.5"
authors = ["Dominik Nakamura <dnaka91@gmail.com>"]
edition = "2021"
rust-version = "1.68"

@ -20,12 +20,12 @@ Remote control OBS with the [obs-websocket] plugin from Rust 🦀.
## Usage
Add `obws` to your project with `cargo add obws@0.11.4` or add it manually to your
Add `obws` to your project with `cargo add obws@0.11.5` or add it manually to your
`Cargo.toml`:
```toml
[dependencies]
obws = "0.11.4"
obws = "0.11.5"
```
In addition, you will need to use the latest [tokio](https://tokio.rs) runtime to use this library

@ -178,7 +178,11 @@ impl Client {
host,
port,
password,
event_subscriptions: None,
event_subscriptions: if cfg!(feature = "events") {
None
} else {
Some(EventSubscription::NONE)
},
#[cfg(feature = "tls")]
tls: false,
broadcast_capacity: None,
@ -258,11 +262,18 @@ impl Client {
trace!(?event, "got OBS event");
events_tx.send(event).ok();
}
#[cfg(not(feature = "events"))]
ServerMessage::Event => {
trace!("got OBS event");
}
ServerMessage::Identified(identified) => {
trace!(?identified, "got identified message");
reidentify_receivers2.notify(identified).await;
}
_ => return Err(InnerError::UnexpectedMessage(message)),
_ => {
trace!(?message, "got unexpected message");
return Err(InnerError::UnexpectedMessage(message));
}
}
Ok(())

Loading…
Cancel
Save