jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Bug in IE8, reported by Denis #269

Closed thepag closed 9 years ago

thepag commented 9 years ago

Noting this issue reported directly to me.

jquery.jplayer.js not work in IE8 on line 1028 not support "indexOf"

self.aurora.canPlay[format] = (self.aurora.formats.indexOf(format) > -1);

need replace like:

self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1);
thepag commented 9 years ago

Confirmed this bug.

The problem is with the line 1028 as described:

self.aurora.canPlay[format] = (self.aurora.formats.indexOf(format) > -1);

The primary problem is that the self.aurora.formats property is an Array instead of a String.

I plan to use code along the lines of:

self.aurora.canPlay[format] = !!self.aurora.formats.[format];

Since this is a major bug, I will be fixing it this afternoon.

thepag commented 9 years ago

Actually, the Florentine air must be getting to me... I'm going with the original suggestion and using $.inArray

self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1);
Afterster commented 9 years ago

Mh indeed, this bug was introduced by my Aurora.js PR, sorry about that and thanks for the report / fix.

thepag commented 9 years ago

I do not know how I let it slip through either. Would have sworn I'd tested it in an IE8 VM of XP, but apparently not :unamused:

jeongjaehan commented 9 years ago

good! :)