Hi!
I have this jsbin http://jsbin.com/ehidi. I wanted to change the data attribute and param[name="movie"] value attribute. It seems to work on Firefox but not on Google chrome or Safari (webkit?).
Thanks!
Hi!
I have this jsbin http://jsbin.com/ehidi. I wanted to change the data attribute and param[name="movie"] value attribute. It seems to work on Firefox but not on Google chrome or Safari (webkit?).
Thanks!
You have two problems.
param[name="movie"]
. You were setting a data
attributes instead of a value
attribute.Try this code instead. It rewrites the correct attribute, and it effectively reloads the flash player by removing then re-adding the flash player object from and to the DOM.
jQuery('#video-page-wrapper li a').click(function() {
var url = "http://youtube.com/v/" + jQuery(this).attr("id");
jQuery('.video-page object').attr({ data: url });
jQuery('.video-page param[name="movie"]').attr({ value: url });
jQuery('.video-page object').remove().appendTo('.video-page');
});