Developer
WebSocket API
Events

Events

Instead of polling, send SubscribeToEvents with a list of tags. XSOverlay sends the matching Update… message right away, then again whenever it changes.

on('UpdateDateTime', (time) => console.log(time.Time));
send('SubscribeToEvents', { jsonData: ['DateAndTime', 'Theme', 'MediaPlayer'] });

Tags

Tag names are case-insensitive.

TagSends
DateAndTimeUpdateDateTime
DeviceInformationUpdateDeviceInformation
ThemeUpdateTheme
LayoutModeUpdateLayoutModeState
MediaPlayerUpdateMediaPlayer
KeyboardLayoutUpdateKeyboardLayout
KeyboardStateUpdateKeyboardState
LanguagesUpdateLanguageList
LanguageMapUpdateLanguageMap
WindowListUpdateWindowList
ActiveOverlayUpdateActiveOverlayInformation
SettingsUpdateSettings
PerformanceUpdateRuntimePerformance
NotificationsNotification, with a notification object, for every notification shown

Unsubscribing

Send UnsubscribeToEvents with the tags to stop.

send('UnsubscribeToEvents', { jsonData: ['DateAndTime'] });