Converting youtube video link to embed link with JavaScript

Videos on youtube usually have a URI such as the following: http://www.youtube.com/watch?v=nCgQDjiotG0 These URIs cannot be used to embed the video in an iframe such as the following: In order to work as part of an embedded iframe, youtube video links must be in the following format: http://www.youtube.com/embed/nCgQDjiotG0 Luckily, given any 'normal' youtube link, it … Continue reading Converting youtube video link to embed link with JavaScript