aaronaustin
New Member
I'm reposting this in the correct forum now. Sorry for the duplicate.
I'm trying to access the callbacks in a custom browser dock. So far I've got a simple HTML file. I set up a script with an eventListener per the example in the docs.
However, nothing is happening on scene change. I tried to see what methods were available in the api:
This only shows the inital object:
I'm trying to access the callbacks in a custom browser dock. So far I've got a simple HTML file. I set up a script with an eventListener per the example in the docs.
JavaScript:
window.addEventListener('obsSceneChanged', function (event) {
var t = document.createTextNode(event.detail.name)
document.body.appendChild(t)
})
However, nothing is happening on scene change. I tried to see what methods were available in the api:
JSON:
function getObjectTest() {
var test = JSON.stringify(window.obsstudio);
var display = document.getElementById("display");
display.innerHTML = test;
}
This only shows the inital object:
{"pluginVersion":"2.9.1"}
. I was under the assumption that OBS injected the API into the browser dock and then it would be available. I'm interested in getting the active scene name for display in the UI. Any help or examples of this working are greatly appreciated. Thanks!