超简单,直接上代码:
<!DOCTYPE html>
<html>
<!--
UIKit Javascript 说明:
https://open.ys7.com/doc/zh/uikit/uikit_javascript.html
-->
<head>
<meta charset="utf-8" />
<title>视频监控</title>
<style>
#myPlayer{
/* max-width: 500px; */
width: 100%;
border-radius:20px 20px 20px 20px;
}
</style>
<script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script>
</head>
<body>
<video id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay>
<source src="http://hls01open.ys7.com/openlive/fbe9b00465xxxxxxxxxxxxxd7f9abd.m3u8" type="application/x-mpegURL" />
</video>
<script>
<!-- 视频监控 -->
var player = new EZUIPlayer('myPlayer');
function log(str){
var div = document.createElement('DIV');
div.innerHTML = (new Date()).Format('yyyy-MM-dd hh:mm:ss.S') + JSON.stringify(str);
document.body.appendChild(div);
}
</script>
</body>
</html>
效果: