-2

Is there a pretty much complete solution to have a video player that can stop at a time code, display some questions and the play then video again? Like the one that coursera.org has. It seems like their player is based on video.js but it's customized. I'm looking for a player that already has the feature so that I could customize questions or whatever. Does anybody have suggestions what should I use?

// I'd be more than happy if it's a react component :)

Zmiter
  • 115
  • 13
  • _“Does anybody have suggestions what should I use?”_ - a different site to ask this kind of questions, because asking for recommendations on external resources is explicitly off-topic here. – CBroe Jun 19 '18 at 10:10

1 Answers1

-1

There is react-player package which will allows you to do so:

import ReactPlayer from 'react-player'

class App extends Component {
  onDuration() {
    console.log('this function will be called every second')
  }

  render () {
    return (
      <ReactPlayer 
        url='your_video_url' 
        playing
        onDuration={this.onDuration}
      />
    )
  }
}
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
  • So, it means that I should check the time code every second myself, and if it's time, I'm pausing the video, and then I have to display an overlay with some questions myself again. Is that correct? If so, it's quite a customization that may be done with any player, but I'm looking for something with out-of-the-box feature to stop and display questions – Zmiter Jun 19 '18 at 10:24
  • I doubt it exists, especially on react.js. While you can make a decent controlling component in a few minutes – Alex Antonov Jun 19 '18 at 10:27