Randomize and customClass options in Custom Player

12 views
Skip to first unread message

matas

unread,
Nov 11, 2010, 5:15:34 AM11/11/10
to SoundCloudAPI
hi all,

good news for the custom player users. We've added 2 new options to
the Custom Players:
https://github.com/soundcloud/soundcloud-custom-player/wiki#options

the first is 'randomize' which will shuffle the tracks before
rendering the player.
$('div.your-container-class').scPlayer({
loadArtworks: 1
});

the second - 'customClass' which allows you to add an additional
classes to the player node.
$('div.your-special-container-class').scPlayer({
customClass : 'special'
});

An even simpler approach is to add an additional class to the source
node, it will be carried over to the generated player.
<a href="http://soundcloud.com/sarahweis/special" class="sc-player
special">Special player</a>

please check out the docs and the examples for more info and tips.

Greets,
Matas
SoundCloud

SoundCloud API Support

unread,
Nov 11, 2010, 6:29:46 AM11/11/10
to soundc...@googlegroups.com
Hi All,

small copy/paste glitch in Matas' mail. To randomize tracks, use the
following code:

$('div.your-container-class').scPlayer({
randomize: true
});

Best,
Johan // SoundCloud API Developer

> --
> You received this message because you are subscribed to the Google Groups "SoundCloudAPI" group.
> To post to this group, send email to soundc...@googlegroups.com.
> To unsubscribe from this group, send email to soundcloudap...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/soundcloudapi?hl=en.
>
>

Marc Kremers

unread,
Nov 11, 2010, 8:01:45 AM11/11/10
to SoundCloudAPI
Yes!
Thank you :-)
Reply all
Reply to author
Forward
0 new messages