OBS detection
revo.isObsRunning() returns whether OBS Studio was detected in the player’s
Windows session. obsRunningChanged(running) fires when that state changes.
Recording, streaming and active Game Capture status are unavailable through
these APIs.
Read the initial value when registering your handler. OBS may already be open when the script starts, and the event reports subsequent changes.
Hide a private panel
Section titled “Hide a private panel”Keep private information in a separate WebView. This example accepts a loaded, non-interactive panel and hides it while OBS is open:
// @ts-check/// <reference types="@revomp/types-client" />import * as revo from 'revo-client';
/** @param {revo.WebView} view A loaded, non-interactive panel. */export function showPrivatePanel(view) { /** @param {boolean} running */ function updateVisibility(running) { view.visible = !running; }
function close() { revo.off('obsRunningChanged', updateVisibility); view.off('closed', close); if (view.valid) view.visible = false; }
revo.on('obsRunningChanged', updateVisibility); view.on('closed', close); updateVisibility(revo.isObsRunning());
return close;}Call const close = showPrivatePanel(view) when opening the panel. Closing OBS
shows the panel again. Call close() when the panel is no longer needed, before
reusing or destroying its WebView. This hides it and removes the event handler.
The closed handler also removes the subscription if the browser closes.
For an interactive panel, coordinate its focus and cursor through your UI controller as described in Cursor and UI focus.
Detection timing
Section titled “Detection timing”The state is checked roughly once per second and changes are delivered on game
frames. isObsRunning() returns the latest detected state.
For creating and loading the panel, see Create a WebView.