Skip to content

Now playing script functions

Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.

nowplaying.control

Presses a media button for your music player, like play, pause or next song. Fails with an error when no music player is open.

Value What to put in
command Optional. Which button: "PlayPause", "Play", "Pause", "Next" or "Previous". Default "PlayPause".
player Optional. Part of the player's name, like "vlc". Leave it out for the player that is playing now.

Gives back: The name of the player that got the button press.

var answer = await Cb.Call("nowplaying.control", new { command = "Next" });
answer = cb.call("nowplaying.control", command="Next")

nowplaying.get

Tells you which song is playing on your computer right now, from any music player (or Spotify when you are signed in).

Gives back: found (false when no player is open), title, artist, album, player (its name), artUrl (cover picture link), duration in seconds, link and playing (true/false).

var answer = await Cb.Call("nowplaying.get");
answer = cb.call("nowplaying.get")