soundcloud / soundcloud-custom-player

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

Player plays first link when using hide/show effects #37

Open m-d-a opened 12 years ago

m-d-a commented 12 years ago

Sorry, another one...

I am using JQuery to hide and show divs, rather than having separate pages. The sc_player is on its own html page, but viewed through an iframe.

Using an adapted version of the minimal skin, if the player is playing when you hide the div that contains the iframe, the audio stops (great - that's what I need), however when you reveal the div again the player starts playing the first track on the page automatically, while the play/pause button is in the same state it was in before hiding the div.

This means that when 'returning' to the div/page that has the player it will be playing track 1 while visually indicating that another track is playing.

Is there a way to use the link that shows/hides the div to tell the player to stop, and set all the buttons to reflect that?

See the page here (sc_player is on the media 'page'):

http://www.bugcompass.co.uk

Thanks