1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/mediacontroller.js

27 lines
723 B
JavaScript
Raw Normal View History

2017-01-03 01:51:36 -05:00
define(['appSettings', 'events'], function (appSettings, events) {
2016-10-23 01:11:46 -04:00
'use strict';
2014-03-29 11:40:32 -04:00
function mediaController() {
var self = this;
var currentPlayer;
2014-04-09 21:12:04 -07:00
self.currentPlaylistIndex = function (i) {
2015-09-15 00:31:12 -04:00
if (i == null) {
2015-09-17 21:51:22 -04:00
// TODO: Get this implemented in all of the players
return currentPlayer.currentPlaylistIndex ? currentPlayer.currentPlaylistIndex() : -1;
2015-09-15 00:31:12 -04:00
}
currentPlayer.currentPlaylistIndex(i);
2014-04-09 21:12:04 -07:00
};
self.removeFromPlaylist = function (i) {
currentPlayer.removeFromPlaylist(i);
};
2014-06-22 01:52:31 -04:00
self.playlist = function () {
return currentPlayer.playlist || [];
};
2014-03-29 11:40:32 -04:00
}
2016-03-07 14:13:58 -05:00
});