2

Is there any way to send a parameter to /oembed so that the artwork will not be shown in the received embed code?

I am thinking about rewriting the src attribute of the iframe in the response html value, but I'd rather not resort to such a hack.

Also, is it safe to assume that the iframe src contains /track/ if (and only if) it's a track?

What I want to achieve is a player that displays artwork for all content types except track, where I want to hide it. My solution would be to look at the received src attribute and set show_artwork=false on it if it's a track.

Does this seem like a very bad idea? :)

4

2 回答 2

3

我也需要这个。不久前,当我在我的 oembed 请求中包含 show_artwork=false 时,它​​已经工作了。

例如。

http://soundcloud.com/oembed?url=http%3A//soundcloud.com/xxx/xxxx&format=json&show_artwork=false&auto_play=false

但是,Soundcloud 似乎对他们的 oembed api 进行了一些更改,现在即使我指定了,返回的代码也指定了 show_artwork=true。

我认为我们可能不得不就此向 Soundcloud 提出功能请求。

当然,我们可以编辑收到的结果,它会起作用,但这绝对不是一个令人满意的解决方案。

于 2012-11-20T17:16:25.330 回答
1

是的,show_artwork 是缺少的 oembed 参数:http: //developers.soundcloud.com/docs/api/reference#oembed

于 2012-12-08T17:09:21.550 回答