mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework now playing screen
This commit is contained in:
parent
b614bbcf09
commit
bb816420e7
14 changed files with 448 additions and 516 deletions
|
@ -1,27 +0,0 @@
|
|||
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 || [];
|
||||
};
|
||||
}
|
||||
});
|
|
@ -64,8 +64,7 @@
|
|||
html += '</div>';
|
||||
|
||||
html += '<button is="paper-icon-button-light" class="playPauseButton mediaButton autoSize"><i class="md-icon">pause</i></button>';
|
||||
html += '<button is="paper-icon-button-light" class="remoteControlButton mediaButton autoSize"><i class="md-icon">tablet_android</i></button>';
|
||||
html += '<button is="paper-icon-button-light" class="playlistButton mediaButton autoSize"><i class="md-icon">queue_music</i></button>';
|
||||
html += '<button is="paper-icon-button-light" class="remoteControlButton mediaButton autoSize"><i class="md-icon">playlist_play</i></button>';
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
@ -185,11 +184,6 @@
|
|||
showRemoteControl();
|
||||
});
|
||||
|
||||
elem.querySelector('.playlistButton').addEventListener('click', function () {
|
||||
|
||||
showRemoteControl(2);
|
||||
});
|
||||
|
||||
toggleRepeatButton = elem.querySelector('.toggleRepeatButton');
|
||||
toggleRepeatButton.addEventListener('click', function () {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['components/remotecontrol', 'emby-tabs', 'emby-button'], function (remotecontrolFactory) {
|
||||
define(['components/remotecontrol', 'emby-button'], function (remotecontrolFactory) {
|
||||
'use strict';
|
||||
|
||||
return function (view, params) {
|
||||
|
|
|
@ -470,7 +470,7 @@
|
|||
isEnabled = true;
|
||||
|
||||
updatePlayerStateInternal(event, state);
|
||||
updatePlaylist();
|
||||
updatePlaylist(player);
|
||||
|
||||
enableStopOnBack(true);
|
||||
}
|
||||
|
@ -732,11 +732,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
function updatePlaylist() {
|
||||
function updatePlaylist(player) {
|
||||
|
||||
var items = playbackManager.playlist();
|
||||
var items = playbackManager.playlist(player);
|
||||
|
||||
var index = playbackManager.currentPlaylistIndex();
|
||||
var index = playbackManager.getCurrentPlaylistIndex(player);
|
||||
|
||||
var previousEnabled = index > 0;
|
||||
var nextEnabled = (index < items.length - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue