1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

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
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;
};