mirror of https://github.com/vector-im/riot-web
Fix first waveform bar highlighting in playback at 0%
parent
f0ff2fc38d
commit
8213c48b7f
|
@ -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});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue