Skip to content

Instantly share code, notes, and snippets.

@thebirk
Created February 5, 2024 23:12
Show Gist options
  • Save thebirk/880890a7f429c858f8611bd978e00ad9 to your computer and use it in GitHub Desktop.
Save thebirk/880890a7f429c858f8611bd978e00ad9 to your computer and use it in GitHub Desktop.
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OBS Websocket</title>
<script src="https://unpkg.com/obs-websocket-js"></script>
<script type="module" async>
document.addEventListener("DOMContentLoaded", async function() {
const obs = new OBSWebSocket();
await obs.connect("ws://192.168.0.158:4455", "4tP1Yw7d5FxnnCjI");
const {currentProgramSceneName} = await obs.call('GetCurrentProgramScene');
console.log(currentProgramSceneName)
await obs.call("SetInputSettings", {
inputName: "ChatHighlight",
overlay: true,
inputSettings: {
url: "https://google.com/",
},
});
})
</script>
</head>
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment