2

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? – andrewxhill Jan 29 '14 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 '14 at 15:10
2

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, privacy policy and cookie policy

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