1.html代码
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.min.js"></script>
<style>
body,center{
padding:0;
margin:0;
}
.v-container{
width:640px;
height:360px;
border:solid 1px red;
}
video{
width:100%;
height:100%;
}
</style>
</head>
<body>
<div class="v-container">
<video id="videoElement" muted autoplay="autoplay" preload="auto" controls="controls">
</video>
</div>
</body>
</html>
<script>
js的代码可参考:http://www.yayihouse.com/yayishuwu/chapter/3208
</script>