0

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 1

1

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>
Sign up to request clarification or add additional context in comments.

1 Comment

Thank You for your response

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.