Core action

This commit is contained in:
James Barnsley
2019-03-18 09:05:17 +13:00
parent d42a1a3992
commit f824cca396
4 changed files with 2356 additions and 2951 deletions

View File

@ -231,6 +231,48 @@ export function removeFromIndex(index_name, key, new_key = null){
/**
* Playing of assetse
**/
/**
* Play one or many URIs
*
* @param uri = String (when playing just one URI, eg playlist)
* @param uris = Array (when playing several URIs, eg tracks)
* @param origin = String (URI from which these URIs came)
* @param shuffle = Boolean (shuffle the order of URIs)
**/
export function playURIs(uri = null, uris = [], origin = null, shuffle = false){
return {
type: 'PLAY_URIS',
uri: uri,
uris: uris,
origin: origin,
shuffle: shuffle
}
}
/**
* Enqueue one or many URIs
*
* @param uris = Array
* @param position = Int (position in track_list in which to insert these URIs)
* @param origin = String (URI from which these URIs came)
* @param shuffle = Boolean (shuffle the order of URIs)
**/
export function enqueueURIs(uris = [], position = null, origin = null, shuffle = false){
return {
type: 'ENQUEUE_URIS',
position: position,
uris: uris,
origin: origin,
shuffle: shuffle
}
}
/**
* Playlist manipulation
**/