`
liuxi1024
  • 浏览: 384213 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

优化FCKeditor.flv播放插件—movie与vcastr3整合

阅读更多

 

 

一、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+'&amp;showplayer=always&amp;width='+this.width+'&amp;height='+this.height+'&amp;showiconplay=true&amp;autoplay='+this.autoplay+'" />';
		    s += '</OBJECT>';

 

另外修改为如上代码,依据Vcastr 3.0里的API进行修改。

 

五、完成后效果如图



 

 

  • 大小: 50.4 KB
  • 大小: 246.4 KB
分享到:
评论
2 楼 liuxi1024 2011-08-17  
点击“浏览服务器”,它会弹出一个对话框 里面有 “浏览”“upload”两个按钮可以进行上传
1 楼 ycysyhj 2011-08-16  
好操,骗人的,根本就没有“浏览”这个这个按钮,怎么上传文件啊

相关推荐

Global site tag (gtag.js) - Google Analytics