|
|
@ -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); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isNaN(currentTime)) { |
|
|
|
this.video.currentTime = currentTime; |
|
|
|
this.video.currentTime = currentTime; |
|
|
|
this.setState({ currentTime }); |
|
|
|
this.setState({ currentTime }); |
|
|
|
|
|
|
|
} |
|
|
|
}, 60); |
|
|
|
}, 60); |
|
|
|
|
|
|
|
|
|
|
|
togglePlay = () => { |
|
|
|
togglePlay = () => { |
|
|
|