Fix seekbar position for zero length audio (#9949)

This commit is contained in:
Michael Weimann 2023-01-23 17:28:31 +01:00 committed by GitHub
parent 51b4555106
commit ed06ed0185
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 3 deletions

View file

@ -22,7 +22,7 @@ import { PlaybackClock } from "../../src/audio/PlaybackClock";
import { UPDATE_EVENT } from "../../src/stores/AsyncStore";
import { PublicInterface } from "../@types/common";
export const createTestPlayback = (): Playback => {
export const createTestPlayback = (overrides: Partial<Playback> = {}): Playback => {
const eventEmitter = new EventEmitter();
return {
@ -63,6 +63,7 @@ export const createTestPlayback = (): Playback => {
liveData: new SimpleObservable<number[]>(),
durationSeconds: 31415,
timeSeconds: 3141,
...overrides,
} as PublicInterface<Playback> as Playback;
};