Starts rewriting the player service.

The API is simplified: we can play a song, restart the currently playing song, load a song (that'll be used only by local storage), play the next track or the previous track.

As a result, I changed all the calls to playSong(false, song) which are now just play(song)
This commit is contained in:
Hyzual 2014-12-10 23:46:57 +01:00
parent 226a768987
commit e51961c167
13 changed files with 145 additions and 446 deletions

View file

@ -8,7 +8,7 @@ angular.module('jamstash.queue.controller', ['jamstash.player.service'])
//angular.copy($rootScope.queue, $scope.song);
$scope.itemType = 'pl';
$scope.playSong = function (loadonly, song) {
player.playSong(loadonly, song);
$scope.playSong = function (song) {
player.play(song);
};
}]);