最新消息:文章中包含代码时,请遵守代码高亮规范!

页面播放flv格式视频[原创]

杂项 Alex 90浏览 0评论

一:下载flvplayer.swf放入程序网站根目录

二:代码使用

[@code lang="php"]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>xxxx</title>
</head>
<body>
<div style="width:1000px; height:600px; margin:0 auto;" >
<h3 align="center" id="title"></h3>
<p class="video"></p>
</div>

<script src="./js/jquery-1.9.1.min.js"></script>
<script>
function init(){
var url = document.location.toString();
var arrUrl = url.split("?");

var para = arrUrl[1];
arr = para.split("=");
var path = arr['1'];
$('#title').text(path);
var html = '';
html += '<object class id="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%">'
html += '<param name="movie" value="./flvplayer.swf">'
html += '<param name="quality" value="high">'
html += '<param name="allowFullScreen" value="true">'
html += '<param name="FlashVars" value="vcastr_file=./vedio/'+path+'" id ="path_param">'
html += '<embed src="./flvplayer.swf" allowfullscreen="true" flashvars="vcastr_file=./vedio/"'+path+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="240" id="path_embed"></embed>'
html += '</object>'

$(".video").before(html);
}
init();
</script>
</body>
</html>
[/code]

转载时请注明出处及相应链接,本文永久地址:https://blog.yayuanzi.com/24682.html


pay_weixin
pay_weixin
微信打赏
pay_weixin
支付宝打赏
感谢您对作者Alex的打赏,我们会更加努力!    如果您想成为作者,请点我

您必须 登录 才能发表评论!