Reputation: 1
When we initially seek the player start time to any other seconds other than 00:00:00 the player gets started at 00:00:00 second and after playing to 00:00:01 sec or fewer it seek to proper seconds that we provided to start the video. It is happening in safari browser. We are using video-react package for this.
<Player
ref="player"
playsInline
startTime={videoStartTime}
src={subject && subject.clipUrl}
onLoadStart={() => {
this.setState({
isLoading: false,
})
}}
onLoadedData={() => {
this.setState({
isLoading: true,
})
}}
>
</player>
When clicking on play button startIntro() following function called,
startIntro = () => {
introStart = 500;
this.setState({
videoStartTime: introStart,
})
this.refs.player.seek(introStart);
this.refs.player.play();
}
Upvotes: 0
Views: 510
Reputation: 5518
Are there error messages or does it fail silently? I have the latter problem. However, the video react instructions suggest you should set the player ref like this:
ref={player => this.player = player}
Upvotes: 1