视频预览
Posted 命
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了视频预览相关的知识,希望对你有一定的参考价值。
利用本地播放器ckplayer
$(‘.js_vodImgList‘).on(‘click‘,‘.preview‘, function(){
var urls = $(this).attr("urls");
var format = $(this).attr("format");
layer.open({
type: 2,
title: false,
area: [‘630px‘, ‘360px‘],
shade: 0.8,
closeBtn: 0,
shadeClose: true,
content: ‘SP_preview.do?urls=‘+urls+‘&format=‘+format
});
});
----------------------------------------------------------------------
<li><a href="javascript:;" class="preview" urls="${map.videoUrl}" format="${map.format}" title="预览"></a></li>
--------------------------------------------------
<div class="paly-iframe">
<div class="btn">
<i class="voice"></i>
</div>
<#if urls?? && format??>
<p style="margin: 5px auto; text-align: center">
<#if format==‘FLV‘>
<object height="300" width="98%" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="${base}/r/cms/www/default/img/flvplayer.swf" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="vcastr_file=${base}/${urls!}&BufferTime=3" /><embed height="500" width="98%" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" flashvars="vcastr_file=${base}/${urls!}" allowfullscreen="true" src="${base}/r/cms/www/default/img/flvplayer.swf"></embed>
</object>
<#elseif format==‘FLASH‘>
<embed height="500" width="98%" type="application/x-shockwave-flash" quality="high" src="${base}/${urls!}" wmode="transparent" align="center"></embed>
<#elseif format==‘CK‘>
<!--ckplayer播放视频-->
<div id="video" style="position:relative;z-index: 100;width:850px;height:500px;float: left;"><div id="a1"></div></div>
<script type="text/javascript">
//函数名称不允许更改 function ckmarqueeadv(){return ‘广告内容‘};
var flashvars={
f:‘${urls!}‘,
c:0,
b:1,
p:1,
st:1,
fc:1,
i:‘‘,
my_url:‘‘,
my_pic:‘‘
};
var video=[‘${urls!}->video/mp4‘];
CKobject.embed(‘${resSys}/ckplayer/ckplayer.swf‘,‘a1‘,‘ckplayer_a1‘,‘850‘,‘500‘,false,flashvars,video);
var box = new LightBox();
function closelights(){//关灯
box.Show();
}
function openlights(){//开灯
box.Close();
}
</script>
<#else>
<embed height="500" width="98%" type="video/x-ms-wmv" src="${base}/${urls}" console="cons" controls="ImageWindow" autostart="true"></embed>
</#if>
</p>
</#if>
</div>
以上是关于视频预览的主要内容,如果未能解决你的问题,请参考以下文章
android 采集摄像头预览帧,使用opencv和MediaCodec直接录制水印滤镜视频
android 采集摄像头预览帧,使用opencv和MediaCodec直接录制水印滤镜视频
Android音视频(六) 使用OpenGL ES 3.0预览Camera