[jQuery] Bug report for media plugin
About the jQuery Media Plugin ( http://www.malsup.com/jquery/media/ ),
there is bug in the "getSettings" function.
Here is the problem codes shown below:
var w = meta.width || parseInt(((cls.match(/w:(\d+)/)||[])[1]||
0));
var h = meta.height || parseInt(((cls.match(/h:(\d+)/)||[])[1]||
0));
In the Options documentation, you are using "width:" and "height:" as
the option name. The above code just parse "/w" and "/h" that is
wrong. The right code is shown below:
var w = meta.width || parseInt(((cls.match(/width:(\d+)/)||[])
[1]||0));
var h = meta.height || parseInt(((cls.match(/height:(\d+)/)||[])
[1]||0));
----
Also, when parsing options from class also can't parse 'autoplay'
option. I also added two lines of code in it. Shown blow:
var a = meta.autoplay || parseInt(((cls.match(/autoplay:(\d+)/)||[])
[1]||0));
if (a) meta.autoplay = a;
I think maybe other options are not parsed. Hope the plugin author
can fix it.
Thanks!