soundcloud / soundcloud-custom-player

The SoundCloud custom javascript based player
http://soundcloud.com
704 stars 231 forks source link

Any way to add play count to the player? #64

Open goldnuggets24 opened 10 years ago

goldnuggets24 commented 10 years ago

I would like to add play counts to my SC player. Is there a way to grab this info from SoundCloud and post along with the player utilizing your phenomenal build? Thanks!

Grinski commented 10 years ago

Hello,

I added a play counter to my custom player using 'track.playback_count'.

For example, I navigated to where the list item was created in the playlist (search for the comment "// create an item in the playlist") and included this piece of code behind the span displaying the track's duration.

<span class="sc-track-playcount">' + track.playback_count + '</span>

I know this post is somewhat dated, but hopefully it will help.