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

fix video player time display

This commit is contained in:
Luke Pulverenti 2015-06-25 17:50:56 -04:00
parent e88f66812d
commit 939e545723
21 changed files with 149 additions and 115 deletions

View file

@ -3,9 +3,12 @@
// Reports media playback to the device for lock screen control
var currentPlayer;
var lastPlayerState;
var lastUpdateTime = 0;
function allowLocalPlayer() {
return false;
}
function updatePlayerState(state, eventName) {
if (!state.NowPlayingItem) {
@ -16,7 +19,7 @@
var isLocalPlayer = MediaController.getPlayerInfo().isLocalPlayer || false;
// Local players do their own notifications
if (isLocalPlayer) {
if (isLocalPlayer && !allowLocalPlayer()) {
return;
}
@ -25,8 +28,6 @@
eventName = 'positionchange';
}
lastPlayerState = state;
var playState = state.PlayState || {};
var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || '';
@ -135,6 +136,10 @@
releaseCurrentPlayer();
if (player.isLocalPlayer && !allowLocalPlayer()) {
return;
}
currentPlayer = player;
console.log('binding remotecontrols to MediaPlayer');