In ewebeditor, ckplayer is used to support the entire html5 (mp4) platform. ckplayerhtml5

Source: Internet
Author: User

In ewebeditor, ckplayer is used to support the entire html5 (mp4) platform. ckplayerhtml5

The school's digital platform Rich Text Editor has been using the ewebeditor, which should be very good. It supports direct import of common office documents, greatly facilitating the upload of teachers' materials, recently, the entire digital campus is planned to be revised to the entire platform. The framework is constructed using bootstrap and the information input is still based on ewebeditor. The best video format for the entire platform is Mp4 + html5, but ewebeditor itself does not support it. Therefore, if you integrate ewebeditor with ckplayer, you can use it as needed.
The specific operations are as follows,
Copy ckplaer to the plug-in of ewebeditor and modify the zh-cn.js file under js. I replaced the original flvplayer with ckplayer, therefore, the following prompt is displayed when you find the lang ["DlgMediaPluginFLV"] = "CkPlayer Player Plugin ".
Open media.htm under dialogto modify the corresponding flv Call Code, as follows:
 

 
 1 case "flv": 2         s_Html = '<div id="a1"></div>' 3             +'<scr'+'ipt type="text/javascript" src="/ewebeditor/plugin/ckplayer/ckplayer.js" charset="utf-8"></sc'+'ript>\n' 4             +'<scr'+'ipt type="text/javascript">\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             +'</sc'+'ript>';13         break;

 

If you need to automatically recognize mp4, you can modify the following code:
 
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": delete 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 ";

 

Now, with ckplayer, videos added by ewebeditor can be automatically switched between html5 and flash on the entire platform.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.