mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
27 lines
723 B
JavaScript
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 || [];
|
|
};
|
|
}
|
|
}); |