Improve progress bar progression for smaller voice messages

Instead of chunking the thing, we'll improve our precision and clock accuracy. Clock accuracy is improved by flagging the "load time" of the clip in the context, which can be about 500ms (or more) off the context's start line. The precision is just a number in the PlaybackWaveform component.
This commit is contained in:
Travis Ralston 2021-05-13 22:35:43 -06:00
parent 1aa09cf0ae
commit ddf9027daa
3 changed files with 12 additions and 2 deletions

View file

@ -126,6 +126,7 @@ export class Playback extends EventEmitter implements IDestroyable {
this.waveformObservable.update(this.resampledWaveform);
this.emit(PlaybackState.Stopped); // signal that we're not decoding anymore
this.clock.flagLoadTime(); // must happen first because setting the duration fires a clock update
this.clock.durationSeconds = this.audioBuf.duration;
}