I have a input that user will place a youtube video link. After check if this is a youtube link I set state with this link.
this.setState({video: url});
inside render I have this:
var showVideo = "";
if(this.state.video != null) {
showVideo = <iframe id="videoObject" type="text/html" src={this.state.video} width="500" title="video" height="265" frameborder="0" allowfullscreen></iframe>
}
and return:
{showVideo}
I try to place the video url inside src, but the video is broken (it doesnt show any video). Any ideas why? (the url is correct)