mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Fixed video position and duration not showing after switching from livestream
This commit is contained in:
parent
72f782d1ea
commit
795393e69a
1 changed files with 5 additions and 0 deletions
|
@ -111,6 +111,9 @@ window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
|||
const currentPlaybackRate = player ? player.getPlaybackRate() : null;
|
||||
|
||||
playerPrevTime = 0;
|
||||
lastPlayerUpdateGenerationTime = 0;
|
||||
isLive = false;
|
||||
isLivePosition = false;
|
||||
|
||||
if (player) {
|
||||
if (player.getSource() === value.url) {
|
||||
|
@ -327,6 +330,8 @@ function playerCtrlStateUpdate(event: PlayerControlEvent) {
|
|||
}
|
||||
else {
|
||||
playerCtrlLiveBadge.setAttribute("style", "display: none");
|
||||
playerCtrlPosition.setAttribute("style", "display: block");
|
||||
playerCtrlDuration.setAttribute("style", "display: block");
|
||||
playerCtrlPosition.textContent = formatDuration(player.getCurrentTime());
|
||||
playerCtrlDuration.innerHTML = `/  ${formatDuration(player.getDuration())}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue