Jamstash/app/queue/queue.js
Hyzual e51961c167 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)
2015-01-17 19:13:40 +01:00

14 lines
451 B
JavaScript

angular.module('jamstash.queue.controller', ['jamstash.player.service'])
.controller('QueueController', ['$scope', '$rootScope', 'globals', 'player',
function ($scope, $rootScope, globals, player) {
'use strict';
$scope.settings = globals.settings;
$scope.song = $rootScope.queue;
//angular.copy($rootScope.queue, $scope.song);
$scope.itemType = 'pl';
$scope.playSong = function (song) {
player.play(song);
};
}]);