技术文摘

发一个小技巧(帝国CMS7.5编辑器增加CK视频播放器)

作者:雨祺   发表于:
浏览:68次    字数:867  电脑原创
级别:站长   总稿:82篇, 月稿:13

发一个小技巧(帝国CMS7.5编辑器增加CK视频播放器),首先去下载CKplayer播放器,接着找到帝国这个文件\e\admin\ecmseditor\infoeditor\plugins\etranmedia\dialogs\etranmedia.js,

第一步,查找
  1. function etmediaViewFileCode(toplay,width,height,autostart,furl){ 
第二步,找到这段如下代码
  1.  else if(toplay==4)//flash 
  2. imgstr="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+width+"\" height=\""+height+"\"><param name=\"movie\" value=\""+furl+"\"><param name=\"quality\" value=\"high\"><embed src=\""+furl+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\"><param name=\"autoplay\" value=\""+autostart+"\" /></embed></object>"
第三步,在上面代码下面增加代码
  1.  else if(toplay==7)//CKPlayer 
  2. var uid = get_uid(); 
  3. var vid = "video-"+uid; 
  4. var pid = "player-"+uid; 
  5. var imgstr = '<script src="' + window.location.protocol + '//' + window.location.host + '/e/m/ckplayer/x/ckplayer.js" charset="utf-8" data-name="ckplayer"></script>'
  6. imgstr += '<div class="videoyuqi" style="width: ' + width + '; height: 500px;"></div>'
  7. imgstr += '<script type="text/javascript">'
  8. imgstr += 'var videoObject = {'
  9. imgstr += 'container: ".videoyuqi",'
  10. imgstr += 'variable: "player",'
  11. imgstr += 'poster: "../material/poster.jpg",'
  12. imgstr += 'htcrossorigin: "",'
  13. imgstr += 'crossdomain: "",'
  14. imgstr += 'video: "' + furl + '"'
  15. imgstr += '};'
  16. imgstr += 'var player = new ckplayer(videoObject);'
  17. imgstr += '</script>'
因为小编是把CKplayer放置在/e/m/下面的。请根据自身的目录结构引用JS

【审核人:站长】

99Ai聊天   收藏   加好友   海报   25分享
点赞(0)
打赏
标签:CMS视频播放器编辑器帝国

发布者资料

热门文章

技术文摘

查看更多技术文摘
    首页
    栏目
    搜索
    会员
    投稿