mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-28 19:10:22 -05:00
Fix bug when clicking on video position slider before starting the video
This commit is contained in:
parent
f0fa6e3a7c
commit
c4e8402ef9
@ -179,8 +179,10 @@ export default class Video extends React.PureComponent {
|
||||
const { x } = getPointerPosition(this.seek, e);
|
||||
const currentTime = Math.floor(this.video.duration * x);
|
||||
|
||||
if (!isNaN(currentTime)) {
|
||||
this.video.currentTime = currentTime;
|
||||
this.setState({ currentTime });
|
||||
}
|
||||
}, 60);
|
||||
|
||||
togglePlay = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user