72 lines
2.7 KiB
HTML
72 lines
2.7 KiB
HTML
|
|
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
|
<meta content="telephone=no" name="format-detection">
|
|
<link href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAAA1BMVEU8sDU4fUu1AAAADUlEQVR42gECAP3/AAAAAgABUyucMAAAAABJRU5ErkJggg==" rel="icon" type="image/x-icon" />
|
|
<title>加载中...</title>
|
|
<link rel="stylesheet" href="./css/DPlayer.min.css">
|
|
<script type="text/javascript" src="./js/hls.js"></script>
|
|
<script type="text/javascript" src="./js/flv.js"></script>
|
|
<script type="text/javascript" src="./js/DPlayer.min.js"></script>
|
|
<style>
|
|
html,body{padding:0;margin:0;background: #000000;}
|
|
.content{background-color:black;padding: 0;margin-top:calc(50vh - 135px);width:100%;height: 270px;color:#999;}
|
|
|
|
#mask{position:fixed;width:100%;height:100%;left:0;top:0;z-index:95;background:rgba(255,255,255,0.2);}
|
|
#mask img{position:absolute;left:calc(50vw - 9vw);top:calc(50vh - 9vw); width:18vw;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div style="position:fixed;width:100%;height:100%;left:0;top:0;background:#000;z-index:1;">
|
|
<div id="a1" class="content"></div>
|
|
</div>
|
|
<div id="mask" onclick="play()"><img src="./img/video_play.png" /></div>
|
|
|
|
<script type="text/javascript">
|
|
function getParameter(val) {
|
|
var uri = window.location.search, re = new RegExp("" + val + "=([^&?]*)", "ig");
|
|
return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
|
|
}
|
|
|
|
function setTitle(title) {
|
|
document.title = title;
|
|
if (/ip(hone|od|ad)/i.test(navigator.userAgent)) {
|
|
var i = document.createElement('iframe');
|
|
i.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAAA1BMVEU8sDU4fUu1AAAADUlEQVR42gECAP3/AAAAAgABUyucMAAAAABJRU5ErkJggg==';
|
|
i.style.display = 'none';
|
|
i.onload = function () {
|
|
setTimeout(function () {
|
|
i.remove();
|
|
}, 9)
|
|
};
|
|
document.body.appendChild(i);
|
|
}
|
|
}
|
|
|
|
var param = JSON.parse(decodeURIComponent(getParameter("param")));
|
|
setTitle(param.name);
|
|
window.dp = new DPlayer({
|
|
element: document.getElementById("a1"),
|
|
autoplay: false,
|
|
video: {
|
|
url: param.url,
|
|
type: 'auto'
|
|
}
|
|
});
|
|
dp.on('play', function () {
|
|
if (document.getElementById("mask")) {
|
|
document.getElementById("mask").remove()
|
|
}
|
|
});
|
|
|
|
function play() {
|
|
dp.play();
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|