obws/examples
2021-03-11 20:42:45 +09:00
..
events.rs Close all event streams on disconnect 2021-03-11 20:42:45 +09:00
iter_scenes.rs Update readme and add some basic usage docs 2020-12-29 21:46:27 +09:00
README.md Initial commit 2020-12-27 22:52:56 +09:00
screenshot.rs Upgrade to obs-websocket 4.9.0 API 2021-02-15 20:39:26 +09:00
simple.rs Update readme and add some basic usage docs 2020-12-29 21:46:27 +09:00

Examples

These are several examples that show how to use obws. If you require authentication for your OBS instance, create a .env file in the project root and add a OBS_PASSWORD entry in it. The examples will pick up the password and authenticate automatically.

  • simple A very basic example showing how to connect, login and print out current version information and the list of scenes.
  • iter_scenes Get a list of all scenes and endlessly iterate through them with a small pause between each change.
  • screenshot Take a screenshot of the currently visible scene and save it as screenshot.png.
  • events Shows how to get a stream of user events and simply print them out to the terminal.