0

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.

code for player

<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();
}

1 Answers1

1

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}
davidfurber
  • 5,274
  • 1
  • 20
  • 11