mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 21:29:05 +00:00
Igor/mathieu/frontend openapi react query (#597)
* small typing * typing fixes --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ type PlayerProps = {
|
||||
];
|
||||
waveform: AudioWaveform;
|
||||
media: HTMLMediaElement;
|
||||
mediaDuration: number;
|
||||
mediaDuration: number | null;
|
||||
};
|
||||
|
||||
export default function Player(props: PlayerProps) {
|
||||
@@ -52,7 +52,9 @@ export default function Player(props: PlayerProps) {
|
||||
container: waveformRef.current,
|
||||
peaks: [props.waveform.data],
|
||||
height: "auto",
|
||||
duration: Math.floor(props.mediaDuration / 1000),
|
||||
duration: props.mediaDuration
|
||||
? Math.floor(props.mediaDuration / 1000)
|
||||
: undefined,
|
||||
media: props.media,
|
||||
|
||||
...waveSurferStyles.playerSettings,
|
||||
|
||||
Reference in New Issue
Block a user