mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve performance of now playing page
This commit is contained in:
parent
bbf03fdf40
commit
fe6a85e143
9 changed files with 1162 additions and 1110 deletions
|
@ -1,4 +1,4 @@
|
|||
(function (window, document, $, setTimeout, clearTimeout) {
|
||||
define([], function () {
|
||||
|
||||
var currentPlayer;
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
html += '<paper-icon-button icon="play-arrow" class="mediaButton unpauseButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="pause" class="mediaButton pauseButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="tablet-android" onclick="Dashboard.navigate(\'nowplaying.html\', false);" class="mediaButton remoteControlButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="tablet-android" class="mediaButton remoteControlButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="queue-music" class="mediaButton playlistButton"></paper-icon-button>';
|
||||
|
||||
html += '</div>';
|
||||
|
@ -183,11 +183,14 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('.playlistButton', elem).on('click', function () {
|
||||
elem.querySelector('.remoteControlButton').addEventListener('click', function () {
|
||||
|
||||
$.mobile.changePage('nowplaying.html', {
|
||||
dataUrl: 'nowplaying.html#playlist'
|
||||
});
|
||||
showRemoteControl();
|
||||
});
|
||||
|
||||
elem.querySelector('.playlistButton').addEventListener('click', function () {
|
||||
|
||||
showRemoteControl('playlist');
|
||||
});
|
||||
|
||||
toggleRepeatButton = $('.toggleRepeatButton', elem).on('click', function () {
|
||||
|
@ -249,6 +252,17 @@
|
|||
}, 300);
|
||||
}
|
||||
|
||||
function showRemoteControl(tab) {
|
||||
|
||||
if (tab) {
|
||||
$.mobile.changePage('nowplaying.html', {
|
||||
dataUrl: 'nowplaying.html#' + tab
|
||||
});
|
||||
} else {
|
||||
Dashboard.navigate('nowplaying.html');
|
||||
}
|
||||
}
|
||||
|
||||
var nowPlayingBarElement;
|
||||
function getNowPlayingBar() {
|
||||
|
||||
|
@ -645,4 +659,4 @@
|
|||
|
||||
bindToPlayer(MediaController.getCurrentPlayer());
|
||||
|
||||
})(window, document, jQuery, setTimeout, clearTimeout);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue