When I enable this module and put in a youtube video in a node, I am getting a javascript error. (Turning off the module makes the error go away).

In IE 9, when I load a page where I've embeded a youtube video, I am getting a javascript error. The first debugging breakpoint (which I think comes from the JS youtube is using) is:


The second error breakpoint is:

      'EMBED_BINARY_URL': '//s.ytimg.com/yt/jsbin/www-embed_core_module-vflka0yFS.js',
      'ORIGIN': "*",
      'IS_OPERA_MINI': false

here are a few things I have done to troiubleshoot this:

  1. Rename .region in the fitvids config area to something random like .regionxyz -- error goes away but obviously videos do not resize anymore.
  2. Try plain vanilla Bartik default theme. -- still the same error so this rules out there's anything funky going on with my theme.
  3. Found this issue for fitvids: https://github.com/davatron5000/FitVids.js/issues/26 and an associated JSFiddle where you can see the error happen (note you should probably have script debugging turned on in IE 9)

Note that changing to IE8 makes the error go away so it seems very specific to IE9.


Danny Englander’s picture

It looks like this is a documented "feature" (bug?) with IE9: see these links:

APIs Are Not Available if iFrame Is Removed from DOM Tree

It has to do with the <iframe> being removed from the DOM tree and is happening when:

you use .wrap() or simple JS that moves the IFRAME

DerekAhmedzai’s picture

Have you tried with the latest version of the module (7.x-1.7) and the latest fitvids library?

Is this still a problem?

Danny Englander’s picture

My issue was solved by the developer of the fitvids library through this thread on github as mentioned above. His help and updated script here ended up working: http://jsbin.com/imojoh/7/edit and solving the issue. I have not made any updates after that as I was happy just to get it working. If I have time, I can test the latest dev and library but I am guessing it's probably ok now, so you can most likely close this. Thank you.

DerekAhmedzai’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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