With a new URL structure, it’s really easy to embed any youtube video on a webpage. This is what you need to do:
- Get the video identifier. If the “watch” url is “http://www.youtube.com/watch?v=VpVrMMcLfk4” then the
identifier is “VpVrMMcLfk4”. That is the value of the “v” parameter. - Insert an iFrame with the src = “http://www.youtube.com/embed/< identifier >“
Here’s a code snippet for your copy paste comfort 😀 :
1 |
<iframe title="YouTube video player" class="youtube-player" type="text/html" width="660" height="410" src="http://www.youtube.com/embed/VpVrMMcLfk4" frameborder="0"></iframe> |
So, how does the video look like? 🙂 Watch it below :