On Track Changed
When what's playing on the desktop changes: another track, paused or played.
◆On Track Changed
Title
Artist
Playing
Inputs
None. It starts a chain of its own.
Outputs
| Pin | Type |
|---|---|
then | what happens next |
Titletitle | text |
Artistartist | text |
Playingplaying | bool |
The code it becomes
The graph below written as a script would write it.
let s2_title = "";let s2_artist = "";let s2_playing = false;// On Track Changedscene.on("media", function (m) { s2_title = String(m && m.title || ""); s2_artist = String(m && m.artist || ""); s2_playing = !!(m && m.playing); scene.log(s2_title);});In a graph
◆On Track Changed
Title
Artist
Playing
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.