
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)
14 lines
451 B
JavaScript
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);
|
|
};
|
|
}]);
|