mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2026-04-18 21:43:32 +00:00
example in readme and main.rb refactored
code style badge changed to standard
This commit is contained in:
11
main.rb
11
main.rb
@@ -1,17 +1,14 @@
|
||||
require_relative "lib/obsws"
|
||||
|
||||
def main
|
||||
r_client =
|
||||
OBSWS::Requests::Client.new(
|
||||
host: "localhost",
|
||||
port: 4455,
|
||||
password: "strongpassword"
|
||||
)
|
||||
|
||||
r_client.run do
|
||||
# Toggle the mute state of your Mic input
|
||||
r_client.toggle_input_mute("Mic/Aux")
|
||||
end
|
||||
).run do |client|
|
||||
# Toggle the mute state of your Mic input
|
||||
client.toggle_input_mute("Mic/Aux")
|
||||
end
|
||||
end
|
||||
|
||||
main if $0 == __FILE__
|
||||
|
||||
Reference in New Issue
Block a user