Open RaviAtTTN opened 4 years ago
Currently my _initialize() method is:
_initialize() {
const component = this;
const player = window.jwplayer(this.videoRef);
const playerOpts = getPlayerOpts(this.props);
initialize({ component, player, playerOpts });
if (this.props.shouldPlay) {
console.log('hello player', player);
player.play();
}
}
And I am getting this:->
Hi, I want to add custom props "shouldPlay". If shouldPlay === true, then I want to play that Jw player otherwise not. Thus I need to call .play() method of jw player while checking the currebt value of shouldPlay. How would I achieve it?