I have custom infowindows in my map that have embed youtube videos. When I'm working directly in cartodb online, everything loads perfectly.

Within the content section of my infowindow code, I have the following: < iframe width="640" height="390" src="{{embed_link}}" frameborder="0" allowfullscreen> < /iframe>

I am trying to create a similar map using Cartodb.js (using the api from the Cartodb map I have created with the infowindows that are able to load the video), and the videos were loading fine for a while, but now they have stopped loading. Where the embeded video should be, there's just a blank grey box that says: "The file or directory could not be found." Is there any reason why the videos might just stop loading when I create a map using Cartodb.js?

Two examples of the embed_link are: "//www.youtube.com/embed/HyCBk9XC2Eo?feature=player_detailpage" and "//www.youtube.com/embed/ZZAFYROf2mY?feature=player_detailpage"

  • can you give a few examples of the text in embed_link? Jan 29, 2014 at 22:45
  • I pulled it straight from youtube, so two examples are: "//www.youtube.com/embed/HyCBk9XC2Eo?feature=player_detailpage" and "//www.youtube.com/embed/ZZAFYROf2mY?feature=player_detailpage"
    – user25917
    Jan 30, 2014 at 15:10

1 Answer 1


I think the problem is that you are opening the HTML directly from the file system and your embed links are like "//www.youtube.com/embed/HyCBk9XC2Eo?feature=player_detailpage" (notice they start with //) so when you open the html from the filesystem the browser tries to fetch file://www.youtube.com/embed/HyCBk9XC2Eo?feature=player_detailpage" (because file: is the procotol being used).

The solution for this is either use http in the embed urls or open the html using a local server (I personally use python -m SimpleHTTPServer), I tried your app in my local browser and the videos are shown

If this is not the case, please, ping me and I will take a further look.

Hope it helps

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.