0

我使用 Soundcloud API 的应用程序今天突然停止正确嵌入小部件。我尝试通过如下嵌入链接访问显示小部件的 url: http ://w.soundcloud.com/player/?url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F67072574&show_artwork= true&show_artwork=false&show_bpm=true&show_comments=true&download=true&maxwidth=440px&maxheight=160px&client_id=61628c1d0518b32eef1d403bb5a4a7a5

它是空白的,我在控制台中注意到了这个错误:

XMLHttpRequest cannot load http://api.soundcloud.com/tracks/66977856?client_id=0f8fdbbaa21a9bd18210986a7dc2d72c&format=json. Origin http://w.soundcloud.com is not allowed by Access-Control-Allow-Origin.

检查嵌入播放器的其他网站,我看到了同样的问题(在 Chrome 上)。

我在他们的状态博客上看到他们今天遇到了一些服务器问题,也许这是一个副作用,因为直到今天一切正常。

无论如何,我还注意到,如果我在 iframe src 中使用https://w.soundcloud.com而不是 'http://' 来嵌入正确显示的播放器。因此我通过做puts embed_info['html'].gsub("http://w","https://w")而不是推荐的来解决它puts embed_info['html']

我想知道我是否应该首先使用https,或者这是他们需要解决的问题。

4

0 回答 0