Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
cornedor committed Aug 29, 2022
2 parents d93a3d2 + df5a13b commit bd67086
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export default class VideoPlayer extends Component {
}

onSeekGrant(e) {
this.props.onSeekGrant && this.props.onSeekGrant()
this.seekTouchStart = e.nativeEvent.pageX;
this.seekProgressStart = this.state.progress;
this.wasPlayingBeforeSeek = this.state.isPlaying;
Expand All @@ -300,6 +301,7 @@ export default class VideoPlayer extends Component {
}

onSeekRelease() {
this.props.onSeekRelease && this.props.onSeekRelease()
this.setState({
isSeeking: false,
isPlaying: this.wasPlayingBeforeSeek,
Expand Down Expand Up @@ -376,12 +378,23 @@ export default class VideoPlayer extends Component {
}

pause() {
this.player && this.player.setNativeProps({
paused: true
})
this.setState({
isPlaying: false,
});
this.showControls();
}

presentFullscreenPlayer() {
this.player && this.player.presentFullscreenPlayer();
}

dismissFullscreenPlayer() {
this.player && this.player.dismissFullscreenPlayer();
}

resume() {
this.setState({
isPlaying: true,
Expand Down

0 comments on commit bd67086

Please sign in to comment.