Skip to content

Commit

Permalink
Added seek function
Browse files Browse the repository at this point in the history
  • Loading branch information
cornedor committed Nov 20, 2017
1 parent 1536ac5 commit 8d97d65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ All other props are passed to the react-native-video component.
- playArrow
- videoWrapper

## Methods

| Method | Props | Description |
|-------------------------|-----------------|---------------------------------------------------------------------------|
| seek | time: float | Seek the player to the given time. |

## Future features

- [X] Make seek bar seekable.
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ export default class VideoPlayer extends Component {
this.hideControls();
}

seek(t) {
this.player.seek(t);
}

renderStartButton() {
const { customStyles } = this.props;
return (
Expand Down

0 comments on commit 8d97d65

Please sign in to comment.