上传文件可以用attachment或者attachmentPC组件
上传后如果要点击图标或文件名播放视频需要自己重写点击图标或文件名的方法,可以参考
http://docs.wex5.com/bex5-ui-question-list-10109/
http://docs.wex5.com/bex5-ui-question-list-10191/
播放音视频可以用html5的video标签,在需要播放视频的位置放置就可以,默认可以设置标签不显示,再重写的方法中控制标签显示
如下:
1.放video标签
<div xid="div27" align="center">
<video xid="video" src="" controls="controls" style="display:none"/>
</div>
2.在重写的点击图标或文件名的方法中获取url给video的src赋值
Model.prototype.attachmentClick = function(event) {
var docPath = event.docPath.get();
var fileID = event.fileID.get();
var docName = event.docName.get();
var url = DocUtils.InnerUtils.getdocServerAction({
"docPath" : docPath,
urlPattern : "/repository/file/view/" + fileID + "/last/content",
isFormAction : false,
context : this.getContext()
});
//判断是否是音视频文件
if ('.avi.wmv.rm.rmvb.mpeg1.mpeg2.mpeg4.mp4.3gp.asf.swf.vob.dat.mov.m4v.flv.f4v.mkv.mts.ts.ogg.'.indexOf(String(/\.[^\.]+$/.exec(docName)) + '.') >= 0) {
$(this.getElementByXid("video")).css("display", "block");
this.getElementByXid("video").src = url;
} else
window.open(url);
};

本例定义了简单的video标签,但video标签对于浏览器的兼容需要自己控制,具体可以参考vedio的说明
http://www.w3school.com.cn/html5/html_5_video.asp
评一波