1
0
Fork 0
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:
Luke Pulverenti 2015-07-11 20:33:50 -04:00
parent 506078a7fd
commit df208fff3a

View file

@ -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 () { volumeSlider = $('.nowPlayingBarVolumeSlider', elem).on('change', function () {
if (currentPlayer) { if (currentPlayer) {
@ -170,6 +172,7 @@
this.pinValue = Dashboard.getDisplayTime(ticks); this.pinValue = Dashboard.getDisplayTime(ticks);
}; };
}, 300);
} }
function getNowPlayingBar() { function getNowPlayingBar() {
@ -187,9 +190,8 @@
elem.classList.add('noMediaProgress'); elem.classList.add('noMediaProgress');
} }
$.mobile.loadPage('nowplaying.html');
bindEvents(elem); bindEvents(elem);
$.mobile.loadPage('nowplaying.html');
return elem; return elem;
} }
@ -218,14 +220,11 @@
var now = new Date().getTime(); var now = new Date().getTime();
if ((now - lastUpdateTime) < 700) { if ((now - lastUpdateTime) < 700) {
console.log('skipping UI update');
return; return;
} }
lastUpdateTime = now; lastUpdateTime = now;
} }
console.log(new Date().getTime());
lastPlayerState = state; lastPlayerState = state;
if (!muteButton) { if (!muteButton) {
@ -250,9 +249,12 @@
updatePlayerVolumeState(state, playerInfo); updatePlayerVolumeState(state, playerInfo);
var nowPlayingItem = state.NowPlayingItem || {}; var nowPlayingItem = state.NowPlayingItem || {};
// See bindEvents for why this is necessary
if (positionSlider) {
if (!positionSlider.dragging) { if (!positionSlider.dragging) {
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) { if (nowPlayingItem.RunTimeTicks) {
var pct = playState.PositionTicks / nowPlayingItem.RunTimeTicks; var pct = playState.PositionTicks / nowPlayingItem.RunTimeTicks;
pct *= 100; pct *= 100;
@ -266,6 +268,7 @@
positionSlider.disabled = !playState.CanSeek; positionSlider.disabled = !playState.CanSeek;
} }
}
var timeText = Dashboard.getDisplayTime(playState.PositionTicks); var timeText = Dashboard.getDisplayTime(playState.PositionTicks);
@ -333,12 +336,15 @@
hideButton(unmuteButton); hideButton(unmuteButton);
} }
// See bindEvents for why this is necessary
if (volumeSlider) {
$(volumeSlider).visible(showVolumeSlider); $(volumeSlider).visible(showVolumeSlider);
if (!volumeSlider.dragging) { if (!volumeSlider.dragging) {
volumeSlider.value = playState.VolumeLevel || 0; volumeSlider.value = playState.VolumeLevel || 0;
} }
} }
}
var currentImgUrl; var currentImgUrl;
function updateNowPlayingInfo(state) { function updateNowPlayingInfo(state) {