I am using npm-react-youtube, I want to not display this div once the video ends.
The code is as follows :
const opts = {
height: '500',
width: '100%',
playerVars: {
// https://developers.google.com/youtube/player_parameters
autoplay: 1,
rel: 0,
controls : 0,
},
}
</div>
{urlId && <Youtube className='player' videoId= {urlId.key}
opts= {opts} />}
</div>
I've tried many ways and nothing seems to help.