diff --git a/README.md b/README.md index 359babe..b9c7d6a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/index.js b/index.js index 62be08b..0b45662 100644 --- a/index.js +++ b/index.js @@ -308,6 +308,10 @@ export default class VideoPlayer extends Component { this.hideControls(); } + seek(t) { + this.player.seek(t); + } + renderStartButton() { const { customStyles } = this.props; return (