Skip to content

Instantly share code, notes, and snippets.

@DavidSouther
Last active August 29, 2015 14:14
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 DavidSouther/5c6a87501804cb39b2e0 to your computer and use it in GitHub Desktop.
Save DavidSouther/5c6a87501804cb39b2e0 to your computer and use it in GitHub Desktop.
Song Flux 1 - Actions
angular.module('trkstr.player.actions', [
'songFlux'
]).factory('PlayerActions', function(songFactory){
function PlayAction(track){
this.track = track;
this.purpose = 'Request a track be played.';
this.dispatcher = songFactory.getDispatcher('trkstr');
}
PlayAction.prototype.dispatch = function(){
this.dispatcher.dispatch(this);
};
return {
Play: PlayAction
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment