jellyfin-web/dashboard-ui/scripts/mediacontroller.js
2017-01-03 01:51:36 -05:00

27 lines
723 B
JavaScript

define(['appSettings', 'events'], function (appSettings, events) {
'use strict';
function mediaController() {
var self = this;
var currentPlayer;
self.currentPlaylistIndex = function (i) {
if (i == null) {
// TODO: Get this implemented in all of the players
return currentPlayer.currentPlaylistIndex ? currentPlayer.currentPlaylistIndex() : -1;
}
currentPlayer.currentPlaylistIndex(i);
};
self.removeFromPlaylist = function (i) {
currentPlayer.removeFromPlaylist(i);
};
self.playlist = function () {
return currentPlayer.playlist || [];
};
}
});