If countdown falls under 0 seconds (due to delays) show a countdown of 0 seconds.
This commit is contained in:
parent
4a58b55b88
commit
2dff2d047c
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ const eta = computed(() =>{
|
|||
let startTime = new Date(props.firstStartedAt * 1000)
|
||||
let playBackSeconds = (now - startTime) / 1000
|
||||
let etaSeconds = Math.round(props.offset - playBackSeconds)
|
||||
if etaSeconds < 0 {
|
||||
etaSeconds = 0
|
||||
}
|
||||
|
||||
if (isNaN(etaSeconds)) {
|
||||
return null
|
||||
|
|
Loading…
Add table
Reference in a new issue