1,导入js文件 swfobject.js
<script type="text/javascript" src="swfobject.js"></script>
2,在head中添加脚本
<script type="text/javascript"> var s1 = new SWFObject("flvplayer.swf","single","300","170","7"); s1.addParam("allowfullscreen","true"); s1.addVariable("file","video.flv"); s1.addVariable("image","preview.jpg"); s1.addVariable("width","300"); s1.addVariable("height","170"); s1.write("player1");
</script>
3,在body中添加dev
<div id="player1"></div>
参考:http://blog.csdn.net/joeyon1985/article/details/39964335
时间: 2024-11-10 22:45:40