You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.6 KiB
138 lines
3.6 KiB
|
2 years ago
|
<!DOCTYPE html>
|
||
|
|
|
||
|
|
<head>
|
||
|
|
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11" />
|
||
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||
|
|
<script src="jquery-1.10.2.min.js"></script>
|
||
|
|
<title>video</title>
|
||
|
|
<style>
|
||
|
|
html,
|
||
|
|
body {
|
||
|
|
height: 100%;
|
||
|
|
width: 100%;
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script>
|
||
|
|
var _haslogin = false;
|
||
|
|
var filePath = ''
|
||
|
|
|
||
|
|
|
||
|
|
function GetUrlParam(paraName) {
|
||
|
|
var url = window.document.location.href.toString();
|
||
|
|
var arrObj = url.split("?");
|
||
|
|
if (arrObj.length > 1) {
|
||
|
|
var arrPara = arrObj[1].split("&");
|
||
|
|
var arr;
|
||
|
|
|
||
|
|
for (var i = 0; i < arrPara.length; i++) {
|
||
|
|
arr = arrPara[i].split("=");
|
||
|
|
|
||
|
|
if (arr != null && arr[0] == paraName) {
|
||
|
|
return arr[1];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return "";
|
||
|
|
} else {
|
||
|
|
return "";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 播放视频
|
||
|
|
* @method playVideoHrv
|
||
|
|
* *****************
|
||
|
|
* @DateTime 2018-12-27
|
||
|
|
* @return {[type]} [description]
|
||
|
|
*/
|
||
|
|
function playVideoHrv() {
|
||
|
|
// WriteLog2(filePath);
|
||
|
|
commonVideoActive.LocalPlay(filePath);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 初始化参数 初始化页面时调用此函数
|
||
|
|
* @method initVideoParam
|
||
|
|
* *****************
|
||
|
|
* @DateTime 2018-12-27
|
||
|
|
* @return {[type]} [description]
|
||
|
|
*/
|
||
|
|
function initVideoParam() {
|
||
|
|
|
||
|
|
try {
|
||
|
|
const myreadreg = new ActiveXObject('WScript.shell');
|
||
|
|
const CurrentVersion = myreadreg.RegRead(
|
||
|
|
'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\海信网络视频监控-通用视频控件\\DisplayVersion'
|
||
|
|
);
|
||
|
|
console.log(CurrentVersion);
|
||
|
|
} catch (e) {
|
||
|
|
alert('请先安装视频控件');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
// alert('initVideoParam')
|
||
|
|
|
||
|
|
filePath = GetUrlParam("filePath").replace(/%5C/g,'\\'); // 文件路径
|
||
|
|
|
||
|
|
// alert(filePath)
|
||
|
|
commonVideoActive.LocalPlay(filePath);
|
||
|
|
|
||
|
|
// setTimeout(function () {
|
||
|
|
// commonVideoActive.LocalPlay(filePath);
|
||
|
|
// }, 30);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnGetInstance()">
|
||
|
|
if (window.console) {
|
||
|
|
console.log('2.0登录成功');
|
||
|
|
}
|
||
|
|
_haslogin = true;
|
||
|
|
playVideoHrv();
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnGetInstanceEx()">
|
||
|
|
if (window.console) {
|
||
|
|
console.log('2.1登录成功');
|
||
|
|
}
|
||
|
|
_haslogin = true;
|
||
|
|
playVideoHrv();
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnGetInstanceFailed(reason)">
|
||
|
|
if (window.console) {
|
||
|
|
console.log('2.0登录失败');
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnGetInstanceFailedEx(reason)">
|
||
|
|
if (window.console) {
|
||
|
|
console.log('2.1登录失败');
|
||
|
|
}
|
||
|
|
playVideoHrv();
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnPlay(index, cameraId)">
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnPlayError(index, cameraId)">
|
||
|
|
//alert('播放失败');
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnPTZEvent()">
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActive" EVENT="OnPTZEventFailed()">
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
<body scroll="no" onload="this.initVideoParam()">
|
||
|
|
<div style='height:100%;width:100%; background-color: #0c234c; display: flex;flex-direction: column'>
|
||
|
|
<div style='flex:1'>
|
||
|
|
<object id="commonVideoActive" classid="clsid:A8B6BBF3-DA78-4BCB-ABAB-FB0410A463E4" width="100%"
|
||
|
|
height="100%"></object>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
|
||
|
|
</html>
|