src/nhttpd/web/Y_VLC.js: fix vlc version parse

This commit is contained in:
satbaby
2012-11-20 19:28:28 +01:00
parent ed8734e2b9
commit e111712fc6

View File

@@ -51,14 +51,15 @@ CyVLC.prototype = {
return words[0]; return words[0];
} }
else else
if(navigator.plugins) { if (navigator.plugins && (navigator.plugins.length > 0)) {
var plug = navigator.plugins['VLC multimedia plugin']; var name = "VLC";
if(typeof plug == 'undefined') for(var i=0;i<navigator.plugins.length;++i)
var plug = navigator.plugins['VLC Multimedia Plugin']; if (navigator.plugins[i].name.indexOf(name) != -1)
if(typeof plug == 'undefined') var plug = navigator.plugins[navigator.plugins[i].name];
var plug = navigator.plugins['VLC Multimedia Plug-in']; if(typeof plug != 'undefined') {
var ex = /^.*[vV]ersion [\"]*([^ \"]*)[\"]*.*$/; var ex = /^.*[vV]ersion [\"]*([^ \"]*)[\"]*.*$/;
var ve = ex.exec(plug.description); var ve = ex.exec(plug.description);
}
if(ve[1]) if(ve[1])
return ve[1]; return ve[1];
else else