pub struct Client { /* private fields */ }
Expand description

The client is the main entry point to access the obs-websocket API. It allows to call various functions to remote control an OBS instance as well as to listen to events caused by the user by interacting with OBS.

Implementations

Connect to a obs-websocket instance on the given host and port.

Connect to a obs-websocket instance with the given configuration.

Disconnect from obs-websocket and shut down all machinery.

This is called automatically when dropping the client but doesn’t wait for all background tasks to complete. Therefore, it is recommended to call this manually once the client is no longer needed.

Adjust settings of the currently active connection by re-identifying against obs-websocket.

This currently allows to change the events to listen for, without the need of a full disconnect and new connection.

Get a stream of events. Each call to this function creates a new listener, therefore it’s recommended to keep the stream around and iterate over it.

Note: To be able to iterate over the stream you have to pin it with futures_util::pin_mut for example.

Errors

Getting a new stream of events fails with Error::Disconnected if the client is disconnected from obs-websocket. That can happen either by manually disconnecting, stopping obs-websocket or closing OBS.

Access API functions related to OBS configuration.

Access API functions related to filters.

Access general API functions.

Access API functions related to hotkeys.

Access API functions related to inputs.

Access API functions related to media inputs.

Access API functions related to outputs.

Access API functions related to profiles.

Access API functions related to recording.

Access API functions related to the replay buffer.

Access API functions related to scene collections.

Access API functions related to scene items.

Access API functions related to scenes.

Access API functions related to sources.

Access API functions related to streaming.

Access API functions related to transitions.

Access API functions related to the user interface.

Access API functions related to the virtual camera.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more