Broadcast time left should never be negative (#10070)
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user