mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Always try to update end time after new media info
This commit is contained in:
@@ -162,7 +162,7 @@ class ClapperRevealerTop extends CustomRevealer
|
||||
|
||||
/* Make sure that next timeout is always run after clock changes,
|
||||
* by delaying it for additional few milliseconds */
|
||||
const nextUpdate = 60002 - parseInt(currTime.get_seconds() * 1000);
|
||||
const nextUpdate = 60004 - parseInt(currTime.get_seconds() * 1000);
|
||||
debug(`updated current time: ${now}, ends at: ${end}`);
|
||||
|
||||
return nextUpdate;
|
||||
|
@@ -203,6 +203,9 @@ class ClapperWidget extends Gtk.Grid
|
||||
this.isSeekable = mediaInfo.is_seekable();
|
||||
this.controls.setLiveMode(isLive, this.isSeekable);
|
||||
|
||||
/* Update remaining end time if visible */
|
||||
this.updateTime();
|
||||
|
||||
if(this.player.needsTocUpdate) {
|
||||
if(!isLive)
|
||||
this.updateChapters(mediaInfo.get_toc());
|
||||
@@ -324,11 +327,11 @@ class ClapperWidget extends Gtk.Grid
|
||||
|
||||
updateTime()
|
||||
{
|
||||
const revealerTop = this.revealerTop;
|
||||
|
||||
if(
|
||||
!revealerTop.visible
|
||||
|| !revealerTop.revealerGrid.visible
|
||||
!this.revealerTop.visible
|
||||
|| !this.revealerTop.revealerGrid.visible
|
||||
|| !this.isFullscreenMode
|
||||
|| this.isMobileMonitor
|
||||
)
|
||||
return null;
|
||||
|
||||
@@ -458,7 +461,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
}
|
||||
|
||||
const isNotStopped = (state !== GstClapper.ClapperState.STOPPED);
|
||||
this.revealerTop.endTime.set_visible(isNotStopped);
|
||||
this.revealerTop.endTime.visible = isNotStopped;
|
||||
}
|
||||
|
||||
_onPlayerDurationChanged(player, duration)
|
||||
|
Reference in New Issue
Block a user