Media
Control media playback and access now playing information from Spotify, Windows Media, and other media players. Display current song on stream and let viewers control music.
Overview
FaustBot integrates with system media controls for playback management:
Now Playing
Get current track, artist, and album.
Playback Control
Play, pause, skip, and previous.
Stream Display
Show current song on your overlay.
Chat Commands
Let viewers see what's playing.
Supported Players
Works with any media player that integrates with Windows Media Session: Spotify, VLC, Windows Media Player, Chrome/Edge, and more.
Setup
Enable Media Integration
Go to Integrations → Media and enable the integration. FaustBot will detect active media sessions.
Start Playing Music
Open your preferred media player (Spotify, etc.) and start playing music. FaustBot will automatically detect the active session.
Create Actions
Set up actions for chat commands like !song or !skip to let viewers interact with your music.
Triggers
Track Changed New song started playingPlayback Started Media started playingPlayback Paused Media was pausedPlayback Stopped Media playback stoppedTrigger Variables
| Variable | Description |
|---|---|
%mediaTitle% | Track/song title |
%mediaArtist% | Artist name |
%mediaAlbum% | Album name |
%mediaPlayer% | Media player name |
%mediaStatus% | Playing, Paused, or Stopped |
%mediaDuration% | Track duration in seconds |
%mediaPosition% | Current position in seconds |
Scripting API
Control media playback from your scripts:
Playback Control
# Get current media info
info = CPH.MediaGetCurrentMedia()
if info:
CPH.LogInfo(f"Now playing: {info['title']} by {info['artist']}")
CPH.LogInfo(f"Album: {info['album']}")
# Media playback controls
CPH.MediaPlay()
CPH.MediaPause()
CPH.MediaPlayPause() # Toggle
CPH.MediaStop()
CPH.MediaNext()
CPH.MediaPrevious()Now Playing Display
# Display now playing in chat
def Execute():
info = CPH.MediaGetCurrentMedia()
if info:
CPH.SendMessage(f"🎵 Now playing: {info['title']} - {info['artist']}")
else:
CPH.SendMessage("No media currently playing")
return True
# Update OBS with current song
def Execute():
info = CPH.MediaGetCurrentMedia()
if info:
text = f"🎵 {info['title']} - {info['artist']}"
CPH.ObsSetGdiText("Now Playing", text)
return TrueSee the full API reference for all available media methods.