Solution to Youtube embed code problem

Something has gone wrong with sharing a video with an embed (iFrame) code. The embedded video doesn't play when the play button is clicked and also nothing happens when we try to click on the Youtube icon to take us to the Youtube website with the video.

The embed code is broken and now looks like this:

<iframe width="560" height="315" src="//www.youtube.com/embed/4jJ5GEB0Bho" frameborder="0" allowfullscreen></iframe>

You will notice that the required http: is missing from the Youtube link. You can try to correct this by editing it to include the missing http: 

But after publishing, the video will still not play. So what is the solution? Fortunately there is a simple solution - instead of adding http:, add https: instead so the embed code will now looks like this:

<iframe width="560" height="315" src="//https:www.youtube.com/embed/4jJ5GEB0Bho" frameborder="0" allowfullscreen></iframe>

0 Response to "Solution to Youtube embed code problem"

Post a Comment