Skip to content

Commit

Permalink
Merge pull request #30 from tessawiedmann/master
Browse files Browse the repository at this point in the history
fix: showReplayControls seeking Chrome bug
  • Loading branch information
fbaiodias authored Jan 12, 2020
2 parents b5ee19b + c89cf33 commit 66273f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video-recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,12 @@ export default class VideoRecorder extends Component {
})
}

handleDurationChange = () => {
if (this.props.showReplayControls) {
this.replayVideo.currentTime = 1000000
}
}

renderCameraView () {
const {
showReplayControls,
Expand Down Expand Up @@ -633,6 +639,7 @@ export default class VideoRecorder extends Component {
autoPlay
controls={showReplayControls}
onClick={this.handleReplayVideoClick}
onDurationChange={this.handleDurationChange}
/>
{videoInput}
</CameraView>
Expand Down

0 comments on commit 66273f9

Please sign in to comment.