user2758087
user2758087

Reputation: 1

Soundcloud widget API load method doesn't apply all visual options

When updating a SoundCloud widget initially embedded using oembed and then updating via load, for example calling widget1.load(url, options) does not apply all of the visual options. The visual options are applied on the initial oembed call, but the load call does not apply them.

Here are the options being sent to the method:

show_bpm: true,
maxheight: 166,
color: '00ace8',
theme_color: '000000',
download: false,
sharing: false,
buying: false,
font: 'Droid Sans',
enable_api: true,
show_user: true,
show_comments: false,

Here are screenshots of the two versions:

SoundCloud screenshots

The first using the oembed call and the second using the load call via the widget api. It appears the "color" tag is being ignored.

Upvotes: 0

Views: 903

Answers (2)

Greg Does Media
Greg Does Media

Reputation: 11

It works if you included it as a query string at the end of your url. So just put ?color=00ace8 at the end of your track's URL, like this:

url = 'http://api.soundcloud.com/tracks/90319611?color=00ace8'

widget.load(url,options)

Upvotes: 1

Raúl Juárez
Raúl Juárez

Reputation: 2159

That's because color option is not an accepted parameter for the load(url,options) method. options parameters are different for oembed and load methods.

You can see the different parameters following the links: oEmbed params and Widget.load params

Upvotes: 0

Related Questions