You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Fix first waveform bar highlighting in playback at 0%
This commit is contained in:
@@ -57,7 +57,8 @@ export default class PlaybackWaveform extends React.PureComponent<IProps, IState
|
||||
};
|
||||
|
||||
private onTimeUpdate = (time: number[]) => {
|
||||
const progress = percentageOf(time[0], 0, time[1]);
|
||||
// Track percentages to very coarse precision, otherwise 0.002 ends up highlighting a bar.
|
||||
const progress = Number(percentageOf(time[0], 0, time[1]).toFixed(1));
|
||||
this.setState({progress});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user