Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Drupal Lightbox2 JWPlayerModule IE8 issue

4 replies [Last post]
Reply

Hello, I'm having an issue very similar to this one from 2010[http://www.longtailvideo.com/support/forums/bits-on-the-run/videoplayer/16814/ie-8-issue], but I can't seem to find a good resolution.

I am managing a Drupal 6 site with Lightbox2 and JWPlayerModules installed. One of the features of the Lightbox2 module is that you can link directly to SWF files, and it will play them in a lightbox. After some tinkering, I was able to get the JWPlayer playing videos in FF, Chrome and IE. Yay.

The only issue is that when I try to close the lightbox in IE8, I'm getting the following error:

An error has occurred in the script on this page
Line 1
Char 1
Error Access is denied
Code 0
Url http://this url is actually a link to the flv.

Do you want to continue running scripts on this page?

In the previous thread which I mentioned and linked to above, someone mentioned that it's possible that the error is caused by the fact that the embed tag in the lightbox has a name attribute, but not an ID attribute. I can confirm that the embed tag created by Lightbox2 does not have an ID attribute.

The way I'm doing this is just linking directly to the player.swf and including the file, image and config parameters in a query string.

I'm incredibly close to having this working perfectly...it's just that damn IE8 script error! Any thoughts? Jeroen? Anyone?

Reply

@Mike -

We only directly support embedding the player using the JW Embedder (jwplayer.js) and SWFObject. But post a link to the page you're having trouble with, and perhaps someone can take a look and give you some advice.

Reply

Thanks Pablo, I appreciate the response. I actually figured out a better way to implement the JWPlayer in a Lightbox. I'll share for anyone else who runs into this issue in the future, although this probably is more relevant to drupal.org or lightbox2 forums.

When I was having this issue yesterday, I was using the rel="lightframe" attribute in my link. I got it the jwplayer working by linking directly to the player.swf in the jwplayermodule directory, and adding the file parameters which pointed to the flv, and had size info, etc...

This "almost" worked, but for the issue with IE8 throwing a scripting error when the lightbox was closed - due to the lack of an id attribute on the embed tag generated by the lightbox2 module.

When I actually looked at all of the Lightbox 2 settings in Drupal, under the Video settings, I realized there was a place to enter the location of your desired FLV player. I added the path to the jwplayermodule player.swf, and changed the link in my page to just reference the flv. Voila! It worked perfectly and no silly scripting error in IE! Good way to start a Friday.

I can also still dynamically add parameters to the url I'm creating, so I can add &image=patriots.jpg and jwplayer is correctly rendering the image. Yay.

I'm building all of this into a content type which is referencing a seperate video content type and pulling the flv field from it. It's dropping the image of the video onto the page, and dynamically creating a lightbox link on the page. Drupal rules.

Thanks again Pablo and hopefully this helps someone else in the future.

Last but not least....GO PATRIOTS!

Reply

I forgot one crucial thing after re-reading this post.

After adding the reference to the JWPlayer player.swf in the lightbox2 video settings, I changed the lightbox link to rel="lightvideo". This tells lightbox to use the Video settings.

Reply

@Mike -

Thanks for sharing! I'll forward this thread to the guy working on our Drupal module, I'm sure he'd be interested in reading your comments.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options