Last active
August 29, 2015 14:14
-
-
Save DavidSouther/5c6a87501804cb39b2e0 to your computer and use it in GitHub Desktop.
Song Flux 1 - Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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