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

add transition to remote control

This commit is contained in:
Luke Pulverenti 2015-03-18 00:09:31 -04:00
parent c5b0fd9b79
commit b73c66bd7f
8 changed files with 142 additions and 70 deletions

View file

@ -23,7 +23,7 @@
html += '<div class="nowPlayingBar" style="display:none;">';
html += '<div style="display:inline-block;width:12px;"></div>';
html += '<a class="mediaButton remoteControlButton" title="' + Globalize.translate('ButtonRemoteControl') + '" href="nowplaying.html" data-role="button" data-icon="remote" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonRemoteControl') + '</a>';
html += '<a class="mediaButton remoteControlButton" title="' + Globalize.translate('ButtonRemoteControl') + '" href="nowplaying.html" data-transition="slideup" data-role="button" data-icon="remote" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonRemoteControl') + '</a>';
html += '<a id="playlistButton" class="mediaButton playlistButton" href="playlist.html" data-role="button" data-icon="bullets" data-iconpos="notext" data-inline="true" title="' + Globalize.translate('ButtonPlaylist') + '">' + Globalize.translate('ButtonPlaylist') + '</a>';
html += '<button id="previousTrackButton" class="mediaButton previousTrackButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
@ -62,6 +62,10 @@
nowPlayingImageElement = $('.nowPlayingImage', elem);
nowPlayingTextElement = $('.nowPlayingText', elem);
$(elem).on('swipeup', function () {
Dashboard.navigate('nowplaying.html');
});
unmuteButton = $('.unmuteButton', elem).on('click', function () {
if (currentPlayer) {
@ -156,11 +160,11 @@
return elem;
}
function showButton(button) {
button.removeClass('hide');
}
function hideButton(button) {
button.addClass('hide');
}
@ -294,7 +298,7 @@
nowPlayingTextElement.html(nameHtml);
var url;
var nowPlayingItem = state.NowPlayingItem;
if (nowPlayingItem.PrimaryImageTag) {
@ -338,7 +342,7 @@
}
currentImgUrl = url;
nowPlayingImageElement.html('<img src="' + url + '" />');
}
@ -405,8 +409,8 @@
var player = this;
player.getPlayerState().done(function(state) {
player.getPlayerState().done(function (state) {
if (player.isDefaultPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
return;
}
@ -427,7 +431,7 @@
player.beginPlayerUpdates();
}
onStateChanged.call(player, {type: 'init'}, state);
onStateChanged.call(player, { type: 'init' }, state);
});
$(player).on('playbackstart.nowplayingbar', onPlaybackStart)