Reputation: 6213
Here is the web page I'm working on: http://sebastianbiermanlytle.com/music.htm
When you click the arrows on the sides of the media players, a javascript changes the source. All of the soundcloud players are refreshing as they are supposed to, but the mixcloud plugins (under "Full 1+ Hour Sets") are not when using chrome or ie (and probably safari), but are refreshing fine in Mozilla. If you inspect the element, you can see that the src and value attributes are changing as they should when the arrows are pressed - the players are just not refreshing to show the new content.
How can I get these players to refresh?
UPDATE:
This code works:
var curSet=0;
var sets = ['<object>....</object>', '<object>...</object>',....];
function nextSet(direction){
....//update curSet value
$('#firstSet').html(sets[curSet]);
}
Upvotes: 0
Views: 145
Reputation: 106385
You're right, it doesn't work in Safari either... Unfortunately it's a known behavior: check this discussion, for example. The only way to get past it is to move manipulation on the higher level. ) You wrap your dynamic elements in <div>
element, like this:
<div id="flash-container">
<object ...>
<embed...></embed>
</object>
</div>
... then completely refresh a container with the new flash object (with the required src
value) each time a control fires:
$('#flash-container')
.html('<object ...><param value="new src" ...><embed ... src="new src">')
Hope this'll help. )
Upvotes: 1