xheditor关于视频上传的修改
来源:互联网 发布:nodejs mysql vue 编辑:程序博客网 时间:2024/06/03 15:25
目前有一个陈年项目,需要支持视频上传。但是xheditor只支持ie下播放。专业的说法是视频通过插件上传之后编译到embed标签下。支持application/x-mplayer2。但是新版的谷歌、火狐并不鸟它。谷需要修改!
下载地址(官网):http://xheditor.com/download.html
不过到2015年之后就不更新了。可惜了,虽然觉得这个style蛮清爽的。但是功能全面性、安全性麽,推荐百度的ueditor。地址:http://ueditor.baidu.com/website/download.html
代码全面的不上了。(吐槽一下,xheditor-1.2.2.min.js这个玩意坑,需要自行格式化一下,因为,顺序完全打乱。)
上步骤:
1、找到对应视频方法“media”
case "media": _this.showEmbed("Media", htmlMedia, "application/x-mplayer2", "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6", ' enablecontextmenu="false" autostart="false"', settings.upMediaUrl, settings.upMediaExt); break;2、原始代码
else 1 === u.length && (e = u[0].split("||"), 0 === r.length && (_this.pasteHTML(l.replace("xhe_tmpurl", e[0] + "#xhe_tmpurl") + " />"), r = $('embed[src$="#xhe_tmpurl"]', _doc)), xheAttr(r, "src", e[0]), r.attr("width", e[1] ? e[1] : t), r.attr("height", e[2] ? e[2] : n))}修改之后
var url=e;var tempFlvCode='<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="'+t+'" height="'+n+'"> <param name="movie" value="/flvplayer.swf" /> <param name="quality" value="high" /> <param name="allowFullScreen" value="true" /> <param name="FlashVars" value="vcastr_file='+url+'&LogoText=description&BufferTime=3&IsAutoPlay=1"> <embed src="/flvplayer.swf" allowfullscreen="true" flashvars="vcastr_file='+url+'&IsAutoPlay=1&LogoUrl=/logo.jpg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+t+'" height="'+n+'"></embed> </object>';_this.pasteHTML(tempFlvCode);原理:
flvplayer.swf
通过此控件播放(具体请baidu、google) 阅读全文
0 0
- xheditor关于视频上传的修改
- 关于使用xheditor实现图片上传
- 关于Jquery 编辑器 xhEditor的使用总结
- xheditor实现上传
- xheditor图片上传
- xheditor struts2 上传文件
- 关于获取上传视频缩略图的方法
- MVC下xheditor上传图片Upload的action图片保存
- xhEditor支持HTML5的文件上传解决application/octet-stream
- 编辑器xheditor图片上传配置如何设置的问题
- 20110308--关于cgbt的图片上传修改
- 修改ueditor的上传文件、图片、视频等路径
- xheditor编辑器上传功能实现
- struts2+xheditor+上传图片功能
- dwz xheditor编辑器文件上传
- xhEditor struts2实现图片上传
- spring mvc+xheditor图片上传
- xheditor+struts 实现图片上传
- 5-2 一元多项式的乘法与加法运算
- Python刷题日记:LeetCode-Longest Substring Without Repeating Characters
- PHP 、shell、crontab 执行定时任务
- 56. Yii Modules
- cesium自定义气泡窗口infoWindow后续优化篇
- xheditor关于视频上传的修改
- 机器学习入门算法基础视频
- Synchronized与ReentrantLock区别
- Spring主要标签
- JQUERY Unit01: jQuery概述 、 jQuery选择器 、 jQuery操作DOM
- FTP文件读取以及删除(问题:xml报错、第二次读取inputstream is null等等问题)
- imgproc模块--多边形测试
- struts2 2.3.32补丁升级后出现问题(无法注入变量问题)
- css按钮样式!很漂亮!