componentDidUpdate(prevProps, prevState) {
    const { isPlaying } = this.props;
    if (prevState.isPlaying !== isPlaying) {
      this.setState({ isPlaying });
      isPlaying ? this.player.current.play() : this.player.current.pause();
    }
  }
// When isPlaying change from Episode component
When isPlaying change from Episode component
When isPlaying change from Episode component
componentDidUpdate(prevProps, prevState) {
    const { isPlaying } = this.props;
    if (prevState.isPlaying !== isPlaying) {
      this.setState({ isPlaying });
      isPlaying ? this.player.current.play() : this.player.current.pause();
    }
  }
componentDidUpdate ( prevProps , prevState ) { const { isPlaying } = this . props ; if ( prevState . isPlaying !== isPlaying ) { this . setState ( { isPlaying } ) ; isPlaying ? this . player . current . play ( ) : this . player . current . pause ( ) ; } }
When isPlaying change from Episode component
When isPlaying change from Episode component