play_redirect.ql

music/play_redirect.ql
Contents of the file.

Function Overview

Function Description
native fun defaultPlay(songToPlay) Play a song via the default "play" keyword invoked as a function, which will call the default "play" action as if no redirection happened.
native fun redirectPlayToList(songList) Starts making all plays add to a song list instead of the previous play action.
native fun redirectPlayToFunction(fn) Starts making all plays invoke the given function with 1 parameter of the song.
native fun redirectReset() Stops all 'play's from any set action and returns it back to its default action.

Functions

native fun defaultPlay(songToPlay) link

Play a song via the default "play" keyword invoked as a function, which will call the default "play" action as if no redirection happened.

Params
songToPlay ( song )

The song

native fun redirectPlayToList(songList) link

Starts making all plays add to a song list instead of the previous play action.

Params
songList ( list )

The list to add songs to

native fun redirectPlayToFunction(fn) link

Starts making all plays invoke the given function with 1 parameter of the song.

Params
fn

The function to call with the song as an argument

native fun redirectReset() link

Stops all 'play's from any set action and returns it back to its default action.