obsws-ruby/main.rb

17 lines
333 B
Ruby
Raw Normal View History

2022-10-22 22:30:40 +01:00
require_relative "lib/obsws"
2023-07-21 06:37:14 +01:00
class Main
def run
2022-10-22 22:30:40 +01:00
OBSWS::Requests::Client.new(
host: "localhost",
port: 4455,
password: "strongpassword"
).run do |client|
# Toggle the mute state of your Mic input
client.toggle_input_mute("Mic/Aux")
end
2023-07-21 06:37:14 +01:00
end
2022-10-22 22:30:40 +01:00
end
2023-07-21 06:37:14 +01:00
Main.new.run if $PROGRAM_NAME == __FILE__