shani
shani

Reputation: 55

I have a component which loads embedded YouTube video as below

const videoSrc =  `https://www.youtube.com/embed/${video.id.Id}`;
<iframe src = {videoSrc}/>

but it keeps on showing the error that An error occurred. Try again later or TroubleShoot it.

Upvotes: 3

Views: 56

Answers (1)

Yudiz Solutions
Yudiz Solutions

Reputation: 4449

This error happened because your video embedded id is wrong so Get the right video id from youtube( embedId inside code) Refer Link:https://help.tcgplayer.com/hc/en-us/articles/115008106868-Finding-Your-YouTube-Video-ID

const videoSrc =  `https://www.youtube.com/embed/${embedId}`;
<iframe src = {videoSrc}/>

Upvotes: 1

Related Questions