一、FCKeditor.flv播放插件--movie
具体用法如下:
1. 下载FCKeditor .flv播放插件movie
【点击下载】
解压到FCKeditor/editor/plugins
2. 打开 FCKeditor/fckconfig.js
A. 在FCKeditor引入插件设置的位置下方加入下面代码:
FCKConfig.Plugins.Add( 'movie', 'en,zh,zh-cn' ) ;
B. 在FCKeditor功能菜单设置中加入'movie',例如:
FCKConfig.ToolbarSets[ "Default"] = [ ['Image','Flash','Movie','Table','Rule','Smiley','SpecialChar','PageBreak']
经过简单的设置后,就能在FCKeditor中插入.flv格式的视频了。
二、由于movie播放插件播放视频时功能简单,于是采用与vcastr3整合。
三、Vcastr 3.0 – flash video(flv) player (开源 Open Source)
相关介绍参看:http://www.ruochigroup.com/main/2008/03/19/vcastr-30/
四、在fckeditor\editor\plugins\movie\ 中修改movieplayer.js
var flashPlayer = "js/vcastr3.swf"; //设置播放器路径
改为vcastr3.swf路径
// Flash video (FLV) s += '<OBJECT id="movie' + rnd + '" '; s += ' type="application/x-shockwave-flash" '; s += ' data="'+ flashPlayer +'" '; s += ' width="'+this.width+'" height="'+this.height+'" >'; s += ' <PARAM name="movie" value="'+ flashPlayer +'" />'; s += ' <param name="allowFullScreen" value="true" />'; s += ' <PARAM name="FlashVars" value="xml=<vcastr><channel><item><source>' + this.url + '</source><duration></duration><title></title></item></channel><config><bufferTime>4</bufferTime><contralPanelAlpha>0.75</contralPanelAlpha><controlPanelBgColor>0x0262cb</controlPanelBgColor><controlPanelBtnColor>0xffffff</controlPanelBtnColor><contralPanelBtnGlowColro>0xffff00</contralPanelBtnGlowColro><controlPanelMode>float</controlPanelMode><defautVolume>0.5</defautVolume><isAutoPlay>false</isAutoPlay><isLoadBegin>true</isLoadBegin><isShowAbout>true</isShowAbout><scaleMode>showAll</scaleMode><isRepeat>false</isRepeat></config><plugIns></plugIns></vcastr>" />'; //s += ' <PARAM name="FlashVars" value="flv='+this.url+'&showplayer=always&width='+this.width+'&height='+this.height+'&showiconplay=true&autoplay='+this.autoplay+'" />'; s += '</OBJECT>';
另外修改为如上代码,依据Vcastr 3.0里的API进行修改。
五、完成后效果如图