Open ghost opened 8 years ago
componentWillReceiveProps(next) { let that = this this.setState({ link: next.data.link, }) } render() { let atrVideo = { "id": "video", "type": "application/x-mpegURL", "className": "video-js vjs-default-skin", "data-setup": '{"preload" : "auto","autoplay" : false,"controls" : true}', "src" : {this.state.link} } return ( <div className="htmlplayer col-md-12 col-xs-12"> <div className="player"> <Video {...atrVideo}> </Video> </div> </div> ) } }
When component receive the new link it can't update link.
Thx