Skip to content

Instantly share code, notes, and snippets.

@vschlegel
Created December 13, 2019 16:33
Show Gist options
  • Save vschlegel/eb50626c33bfdac10db6c7fc0273d5ea to your computer and use it in GitHub Desktop.
Save vschlegel/eb50626c33bfdac10db6c7fc0273d5ea to your computer and use it in GitHub Desktop.
function script_description()
return "Controlls tally light when recording and streaming."
end
o = obslua
function script_load()
o.obs_frontend_add_event_callback(obs_frontend_callback)
end
function script_unload()
end
function obs_frontend_callback(event, private_data)
if event == o.OBS_FRONTEND_EVENT_RECORDING_STARTED then
--RECORDING STARTED
os.execute("curl -d \"Id=slider1\" -d \"Value=255\" http://192.168.0.42/submit")
elseif event == o.OBS_FRONTEND_EVENT_RECORDING_STOPPED then
--RECORDING STOPPED
os.execute("curl -d \"Id=slider1\" -d \"Value=0\" http://192.168.0.42/submit")
elseif event == o.OBS_FRONTEND_EVENT_STREAMING_STARTED then
--STREAMING STARTED
os.execute("curl -d \"Id=slider2\" -d \"Value=255\" http://192.168.0.42/submit")
elseif event == o.OBS_FRONTEND_EVENT_STREAMING_STOPPED then
--STREAMING STOPPED
os.execute("curl -d \"Id=slider2\" -d \"Value=0\" http://192.168.0.42/submit")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment