I've a website built on asp.net mvc.I would like to include the videos from my youtube channels using youtube API.What's the best way to embed videos in a website from YOUTUBE using YOUTUBE API?
1 Answer
Since January 2015 Youtube recommends to embed the videos using an iframe: see doc here.
Once you get the api video list from https://www.googleapis.com/youtube/v3/videos, all the video ids are placed within the items object response.
From there you would do something as follows:
<iframe width="420" height="315"
src="http://www.youtube.com/embed/{{YOUR_VIDEO_ID_HERE}}?autoplay=1">
</iframe>
1 Comment
sujay raj
Thank You for your response