1
0
Fork 0
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:
Michael Hollister 2024-11-19 09:25:13 -06:00
parent 72f782d1ea
commit 795393e69a

View file

@ -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 = `/&nbsp&nbsp${formatDuration(player.getDuration())}`;
}