Skip to content

Audio Sources (Radios) ​

StreamooS integrates two independent audio sources: KHInsider Radio and SMTC (System Media Transport Controls, the operating system's media player). Each runs in its own context and syncs its state to overlays via WebSocket.

The direct Spotify API integration was removed (ADR-012). Spotify is still controllable, but like any other application, through SMTC.

KHInsider Radio ​

Play game music from KHInsider playlists.

Architecture ​

Behavior ​

  • Watchdog: checks state every 5s. If no update for 15s, the window is marked "stale" and a retry is triggered.
  • Persistent shuffle: stays active until explicitly disabled (shuffle with data.enabled: false).
  • Throttling: position updates (progressMs) emitted at most every 3s during stable playback. Transitions (play/pause/next) are immediate.
  • Lazy loading: the KHInsider window is only instantiated on first use.

WS Commands ​

CommandParametersDescription
play / pause / next-Playback control
shuffledata.enabled (bool, optional)Toggle shuffle
volumedata.value (0–100)Set volume
get_state / activate / deactivate / diagnostic-State & debug

Overlay Themes ​

ThemeDescription
streamoosDefault StreamooS theme
minimal-darkMinimal dark variant

SMTC (System Media Transport Controls) ​

Read metadata from the active system media player without OAuth, with playback control support.

Works with: the Spotify desktop app, YouTube Music, Tidal, VLC, Windows Media Player, and any player exposing SMTC (Windows) or MPRIS (Linux).

Architecture ​

Local Interpolation ​

To ensure smooth visual progress between the 3s throttled updates and 1000ms polling ticks, the Dashboard UI performs 1s local interpolation using the lastUpdatedAt timestamp.

Smart Polling ​

The 1000ms polling is automatically suspended when:

  • App minimized to tray + no WS clients connected
  • System sleeping (via powerMonitor)

It resumes immediately on reactivation.

OS Availability ​

OSImplementationStatus
WindowsWinRT native via NAPI (native/)Functional
LinuxMPRIS (D-Bus enumeration)Functional (Supports any compliant player)
macOS-Not supported (Stub)

WS Commands ​

CommandDescription
start_monitoring / stop_monitoring / get_stateMonitoring control
play / resume / pause / toggle_play / play_pausePlayback
next / prev / previousTrack navigation

WS Commands ​

CommandParametersDescription
start_monitoring / stop_monitoring-Monitoring control
get_state-Get current state
play / resume / pause / toggle_play / play_pause-Playback
next / prev / previous-Track navigation
set_overlay_configdata.enabled, data.radioSource, data.position, data.showArtwork, data.showProgress, data.themeOverlay settings
select_sourcedata.radioSource (auto | khinsider | smtc)Radio Source

Overlay Themes ​

ThemeDescription
streamoosDefault StreamooS theme
animal-crossingAnimal Crossing inspired
retro-rpgRetro RPG dialogue box
modern-gamerModern gamer HUD
ghibliSoft Ghibli palette
xpWindows XP window
glassFrosted glass
noisyGrainy texture
minimal-darkMinimal dark variant

SmtcState Contract ​

typescript
{
  connected: boolean        // player detected
  isPlaying: boolean
  title: string
  artist: string
  albumTitle?: string
  artworkUrl?: string
  progressMs: number
  durationMs: number
  radioSource: 'khinsider' | 'smtc'
  mediaApp: string          // app id detecte (AUMID Windows / bus MPRIS), '' si inconnu
  mediaAppLabel: string     // libelle humain, '' si inconnu
  lastUpdatedAt: number     // Unix timestamp ms
  platform?: string         // 'win32' | 'linux' | 'darwin'
  overlayConfig: {
    enabled: boolean
    radioSource: 'auto' | 'khinsider' | 'smtc'
    position: OverlayPosition
    showArtwork: boolean
    showProgress: boolean
    theme: RadioOverlayTheme
  }
}

Comparison ​

CriteriaKHInsiderSMTC
OAuth requiredNoNo
Playback controlYesYes
MetadataYesYes
Real-time updateThrottled 3sPolling 1000ms
External dependencyPlaylist URLSMTC/MPRIS player
StatusStableWindows stable / Linux partial

Released under the MIT License.