Skip to content

Instantly share code, notes, and snippets.

@ibehnam
Created July 17, 2022 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibehnam/1163ccc8116147bf6a55c42b90ece5ea to your computer and use it in GitHub Desktop.
Save ibehnam/1163ccc8116147bf6a55c42b90ece5ea to your computer and use it in GitHub Desktop.
Spotify's Commands in its SDEF file
<command name="next track" code="spfyNext" description="Skip to the next track.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPNextTrackScriptCommand"/>
</command>
<command name="previous track" code="spfyPrev" description="Skip to the previous track.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPPreviousTrackScriptCommand"/>
</command>
<command name="playpause" code="spfyPlPs" description="Toggle play/pause.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPPlayPauseScriptCommand"/>
</command>
<command name="pause" code="spfyPaus" description="Pause playback.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPPauseScriptCommand"/>
</command>
<command name="play" code="spfyPlay" description="Resume playback.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPPlayScriptCommand"/>
</command>
<command name="play track" code="spfyPCtx" description="Start playback of a track in the given context.">
<access-group identifier="com.spotify.playback"/>
<cocoa class="SPPlayTrackScriptCommand"/>
<direct-parameter description="the URI of the track to play" type="text"/>
<parameter name="in context" code="cotx" description="the URI of the context to play in" type="text" optional="yes">
<cocoa key="context"/>
</parameter>
</command>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment