In using the brightcove CCK field, I noticed in the page's source has duplicate experiences javascript inline embeds... It seems that it's adding the inline javascript every time a brightcove field is loaded.

I rolled out a patch that eliminates the duplicates.

Comments

sp3boy’s picture

StatusFileSize
new1.11 KB

Please have a look at the attached patch. It uses a Drupal-sanctioned approach to adding the external script reference to the page header rather than replying on document.write. I found out the hard way that the explicit </script> closure is necessary for D6.

More importantly I was having a lot of trouble with Internet Explorer (IE8 in my case) not loading videos that were in a carousel on the front page of the site in question. While checking out this issue of multiple script inclusion, I noticed that every video object had exactly the same "id" attribute ("myExperience") which is the default from the echove.php library code. Adding an incremental number to the id via the $params[] array (which is referred to but never set) before it's passed to the embed() method appears to cure my IE8 multi-video problem.

marek.trunkat’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.