Note that there are some explanatory texts on larger screens.

plurals
  1. POShould we be using https to request soundcloud player embed?
    text
    copied!<p>My app which uses the Soundcloud API all the sudden stopped embedding widgets correctly today. I tried visiting the url which displays the widget by itself by following an embed link like so: <a href="http://w.soundcloud.com/player/?url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F67072574&amp;show_artwork=true&amp;show_artwork=false&amp;show_bpm=true&amp;show_comments=true&amp;download=true&amp;maxwidth=440px&amp;maxheight=160px&amp;client_id=61628c1d0518b32eef1d403bb5a4a7a5" rel="nofollow">http://w.soundcloud.com/player/?url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F67072574&amp;show_artwork=true&amp;show_artwork=false&amp;show_bpm=true&amp;show_comments=true&amp;download=true&amp;maxwidth=440px&amp;maxheight=160px&amp;client_id=61628c1d0518b32eef1d403bb5a4a7a5</a></p> <p>It was blank, and I noticed in the console this error:</p> <p><code>XMLHttpRequest cannot load http://api.soundcloud.com/tracks/66977856?client_id=0f8fdbbaa21a9bd18210986a7dc2d72c&amp;format=json. Origin http://w.soundcloud.com is not allowed by Access-Control-Allow-Origin.</code></p> <p>Checking other sites that embed the player, I saw the same issue (on Chrome).</p> <p>I saw on their <a href="http://status.soundcloud.com/post/35606705422/outage-update" rel="nofollow">status blog</a> that they had some server issues today, maybe this is a side effect, since everything worked properly until today.</p> <p>Anyways, I also noticed that if I use <a href="https://w.soundcloud.com" rel="nofollow">https://w.soundcloud.com</a> instead of 'http://' in the iframe src to embed the player displayed correctly. Therefore I worked around it by doing <code>puts embed_info['html'].gsub("http://w","https://w")</code> instead of the recommended <code>puts embed_info['html']</code>.</p> <p>I would like to know whether I was supposed to use <code>https</code> in the first place, or this is something that needs to be fixed on their end.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload