kodReady.push(function(){ kodApp.add({ name:"VLCPlayer", title:LNG['Plugin.default.VLCPlayer'], ext:"{{config.fileExt}}", sort:"{{config.fileSort}}", icon:'{{pluginHost}}static/images/icon.png', callback:function(path,ext){ if(isWap()){//ios不支持文件下载 window.open(core.path2url(path)); return; } var dialog = $.dialog({ ico:core.icon(ext), title:urlDecode(core.pathThis(path)), animate:false, width:750, height:450, content:makePlayer(core.path2url(path)), resize:true, padding:0, fixed:true }); $('.VLCPlayer-dialog embed').css('background','#000'); setTimeout(function() { var vlc = getVLC("vlc"); if(!vlc || !vlc.playlist){ dialog.DOM.wrap.find('.error-tips').removeClass('hidden'); } dialog._clickMax(); dialog._clickMax(); },500); } }); function getVLC(name){ if (window.document[name]){ return window.document[name]; } if ($.isIE()) { if (document.embeds && document.embeds[name]){ return document.embeds[name]; } }else{ return document.getElementById(name); } } var makePlayer = function(src){ if(navigator.platform.toLowerCase().indexOf('win') == -1 ){ var msg = '
\
\
'; return msg; } var player = ""; var width = '100%',height = '100%'; var download = "http://download.videolan.org/pub/videolan/vlc/2.2.6/win32/vlc-2.2.6-win32.exe"; player = ''; player += ''; player += ''; player += ''; return player; } });