I am using the SoundCloud custom player (https://github.com/soundcloud/soundcloud-custom-player) and have a site where this needs to be in a seperate frame so the audio keeps playing when the main site is being navigated. I need to pass the track url to the player in the top frame from within the main frame. I have tried the below code with no luck. The top frame has the name and id of 'play'. Can anyone advise how I can do this please? Many thanks.
<a class="sc-remote-play" href="#">Play Me</a>
<script type="text/javascript">
$(function() {
$('a.sc-remote-play').live('click', function(event) {
$('top.frames["play"].sc-player').scPlayer({
links: [{url: "http://SOUNDCLOUD_PATH_HERE"}],
autoPlay: true
});
});
});
</script>