mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
3.0.5666.9
This commit is contained in:
parent
506078a7fd
commit
df208fff3a
1 changed files with 46 additions and 40 deletions
|
@ -135,6 +135,8 @@
|
|||
});
|
||||
});
|
||||
|
||||
// Unfortunately this is necessary because the polymer elements might not be ready immediately and there doesn't seem to be an event-driven way to find out when
|
||||
setTimeout(function() {
|
||||
volumeSlider = $('.nowPlayingBarVolumeSlider', elem).on('change', function () {
|
||||
|
||||
if (currentPlayer) {
|
||||
|
@ -170,6 +172,7 @@
|
|||
|
||||
this.pinValue = Dashboard.getDisplayTime(ticks);
|
||||
};
|
||||
}, 300);
|
||||
}
|
||||
|
||||
function getNowPlayingBar() {
|
||||
|
@ -187,9 +190,8 @@
|
|||
elem.classList.add('noMediaProgress');
|
||||
}
|
||||
|
||||
$.mobile.loadPage('nowplaying.html');
|
||||
|
||||
bindEvents(elem);
|
||||
$.mobile.loadPage('nowplaying.html');
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
@ -218,14 +220,11 @@
|
|||
var now = new Date().getTime();
|
||||
if ((now - lastUpdateTime) < 700) {
|
||||
|
||||
console.log('skipping UI update');
|
||||
return;
|
||||
}
|
||||
lastUpdateTime = now;
|
||||
}
|
||||
|
||||
console.log(new Date().getTime());
|
||||
|
||||
lastPlayerState = state;
|
||||
|
||||
if (!muteButton) {
|
||||
|
@ -250,9 +249,12 @@
|
|||
updatePlayerVolumeState(state, playerInfo);
|
||||
|
||||
var nowPlayingItem = state.NowPlayingItem || {};
|
||||
|
||||
// See bindEvents for why this is necessary
|
||||
if (positionSlider) {
|
||||
if (!positionSlider.dragging) {
|
||||
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
if (nowPlayingItem.RunTimeTicks) {
|
||||
|
||||
var pct = playState.PositionTicks / nowPlayingItem.RunTimeTicks;
|
||||
pct *= 100;
|
||||
|
@ -266,6 +268,7 @@
|
|||
|
||||
positionSlider.disabled = !playState.CanSeek;
|
||||
}
|
||||
}
|
||||
|
||||
var timeText = Dashboard.getDisplayTime(playState.PositionTicks);
|
||||
|
||||
|
@ -333,12 +336,15 @@
|
|||
hideButton(unmuteButton);
|
||||
}
|
||||
|
||||
// See bindEvents for why this is necessary
|
||||
if (volumeSlider) {
|
||||
$(volumeSlider).visible(showVolumeSlider);
|
||||
|
||||
if (!volumeSlider.dragging) {
|
||||
volumeSlider.value = playState.VolumeLevel || 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var currentImgUrl;
|
||||
function updateNowPlayingInfo(state) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue