mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-26 05:33:43 +01:00
Fix bug when clicking on video position slider before starting the video
This commit is contained in:
parent
f0fa6e3a7c
commit
c4e8402ef9
1 changed files with 4 additions and 2 deletions
|
@ -179,8 +179,10 @@ export default class Video extends React.PureComponent {
|
||||||
const { x } = getPointerPosition(this.seek, e);
|
const { x } = getPointerPosition(this.seek, e);
|
||||||
const currentTime = Math.floor(this.video.duration * x);
|
const currentTime = Math.floor(this.video.duration * x);
|
||||||
|
|
||||||
this.video.currentTime = currentTime;
|
if (!isNaN(currentTime)) {
|
||||||
this.setState({ currentTime });
|
this.video.currentTime = currentTime;
|
||||||
|
this.setState({ currentTime });
|
||||||
|
}
|
||||||
}, 60);
|
}, 60);
|
||||||
|
|
||||||
togglePlay = () => {
|
togglePlay = () => {
|
||||||
|
|
Loading…
Reference in a new issue