Broadcast time left should never be negative (#10070)
This commit is contained in:
parent
27bd04a875
commit
cfba1b07c6
2 changed files with 17 additions and 1 deletions
|
@ -441,7 +441,9 @@ export class VoiceBroadcastPlayback
|
|||
}
|
||||
|
||||
public get timeLeftSeconds(): number {
|
||||
return Math.round(this.durationSeconds) - this.timeSeconds;
|
||||
// Sometimes the meta data and the audio files are a little bit out of sync.
|
||||
// Be sure it never returns a negative value.
|
||||
return Math.max(0, Math.round(this.durationSeconds) - this.timeSeconds);
|
||||
}
|
||||
|
||||
public async skipTo(timeSeconds: number): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue