【jquery】插件之jwplayer
一、下载地址
二、使用方法
2.1: 导入jwplayer
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
2.2: 使用jwplayer
<div id="myElement">Loading the player...</div> <script type="text/javascript"> jwplayer("myElement").setup({ file: "/uploads/myVideo.mp4", image: "/uploads/myPoster.jpg" }); </script>
三、Demo
<!DOCTYPE HTML> <html style="background:#1F1813;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="" /> <meta name="keywords" content="" /> <title>JWPlayer</title>
<script type="text/javascript" src="js/jwplayer.js"></script> </head> <body style="width:711px; height:400px; margin:0 auto;"> <div id="space" style="height:145px;"></div> <div id="videoWrapper"> <div id="div-video"></div> </div> <script> jwplayer("div-video").setup({ flashplayer: "swf/jwplayer.flash.swf", file: "video/video.mp4", 'autostart': 'true', width:711, height:400 }); </script> </body> </html>