Example from RoA Stream Tool https://github.com/Readek/RoA-Stream-Tool/blob/master/Stream%20Tool/Resources/Scripts/Utils/On%20Transition%20Event.mjs
// if browser is on OBS
if (window.obsstudio) {
// every time the browser source becomes active
window.addEventListener('obsSourceActiveChanged', (event) => {
Example from RoA Stream Tool https://github.com/Readek/RoA-Stream-Tool/blob/master/Stream%20Tool/Resources/Scripts/Utils/On%20Transition%20Event.mjs