media
media copied to clipboard
Problem with IE9 - fails on createElement
Hi,
jquery.media does not work with Internet Explorer 9
error: SCRIPT5022: DOM Exception: INVALID_CHARACTER_ERR (5) on line 414: var o = document.createElement(a.join(''));
IE9 handles createElement different than IE8 does does
any ideas?
Best reagrds
Bernd
I had the same problem. Here is what I did:
I am using jQuery Media Plugin version 0.97. I copied the js file to a local file on my server. In my local file I made the following changes:
replace: var o = document.createElement(a.join(''));
with: //IE9 if($.browser.version =='9.0'){ var o = document.createElement("div"); o.innerHTML = a.join(''); $.fn.media.defaults.autoplay = 0; } //IE8 if($.browser.version =='8.0'){ var o = document.createElement(a.join('')); $.fn.media.defaults.autoplay = 1; }
Hope that helps someone!