Fixes the communication between the player directive and the player service

- Adds a "playEnded()" function specifically for jplayer to call when the currently playing song ends. It uses $rootScope.$apply() to notify the directive that the song has changed.
- Shows the player controls' css.
- Marks the tests relating the "playing" status of the song as pending.
- Further uses the Player service in the subsonic view
This commit is contained in:
Hyzual 2014-12-20 16:39:56 +01:00
parent f6d2286456
commit 19661f463b
10 changed files with 125 additions and 57 deletions

View file

@ -4,11 +4,17 @@ angular.module('jamstash.queue.controller', ['jamstash.player.service'])
function ($scope, globals, player) {
'use strict';
$scope.settings = globals.settings;
$scope.song = player.queue;
$scope.player = player;
//$scope.song = player.queue;
//angular.copy($rootScope.queue, $scope.song);
$scope.itemType = 'pl';
$scope.playSong = function (song) {
console.log('Queue Controller - playSong()', song);
player.play(song);
};
$scope.queueEmpty = function () {
player.queue = [];
};
}]);