时间:2021-07-01 10:21:17 帮助过:20人阅读
1 case "flv": 2 s_Html = '' 3 +'\n' 4 +' \n' 5 +'var flashvars={\n' 6 +'f:\''+sFromUrl+'\',\n' 7 +'c:0,\n' 8 +'loaded:\'loadedHandler\'\n' 9 +'};\n'10 +'var video=[\''+sFromUrl+'->video/mp4\'];\n'11 +'CKobject.embed(\'/ewebeditor/plugin/ckplayer/ckplayer.swf\',\'a1\',\'ckplayer_a1\',\''+sWidth+'\',\''+sHeight+'\',true,flashvars,video);\n'12 +'';13 break;
如果你需要自动识别mp4,可以修改下面的代码
1 switch(s_Ext){ 2 case "flv": 3 case "f4v": 4 case "mp4": 5 sPlugin = "flv"; 6 break; 7 case "asf": 8 case "avi": 9 case "mp3":10 //case "mp4": 删除11 case "wav":12 case "mpg":13 case "mpeg":14 case "mid":15 case "midi":16 case "aif":17 case "aifc":18 case "aiff":19 sPlugin = "mediaplayer6";
至此,利用ckplayer,ewebeditor添加的视频就可以做到全平台html5 和flash的自动切换了。