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.
113 lines
3.3 KiB
113 lines
3.3 KiB
|
2 years ago
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
|
<title>语音通话</title>
|
||
|
|
<style>
|
||
|
|
body {
|
||
|
|
margin: 0px;
|
||
|
|
overflow: hidden
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
|
||
|
|
<script type="text/javascript" src="HiMsg.js"></script>
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
var GetInstanceCallback;
|
||
|
|
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 "";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
//播放单个视频
|
||
|
|
function playOne(cameraid) {
|
||
|
|
//alert('播放视频成功');
|
||
|
|
commonVideoActiveX.PlayAudio(cameraid);
|
||
|
|
}
|
||
|
|
function login(initpam, callback) {
|
||
|
|
// alert('开始登陆');
|
||
|
|
GetInstanceCallback = callback;
|
||
|
|
//如果是2.0.形式
|
||
|
|
if(typeof initpam == 'string'){
|
||
|
|
commonVideoActiveX.GetInstance(initpam);
|
||
|
|
}else{//如果是1.0形式
|
||
|
|
try {
|
||
|
|
commonVideoActiveX.GetInstanceEx(initpam.strURL);
|
||
|
|
// alert('视频控件已经安装');
|
||
|
|
}catch(e){
|
||
|
|
alert('请安装视频控件!');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function initMDSParam()
|
||
|
|
{
|
||
|
|
var url = "/HiatmpPro/ddm/baseinfo/getSysParams?paramCode="+"COMM_VIDEO_QUERY_LOCATION";
|
||
|
|
$.ajax({
|
||
|
|
url:url,
|
||
|
|
type: 'get',
|
||
|
|
dataType:'json',
|
||
|
|
cache: false,
|
||
|
|
success: function (data) {
|
||
|
|
var paramvalue = 'http://192.168.232.17:8080/VideoService/query?wsdl';
|
||
|
|
var initParam = {
|
||
|
|
strIndex: 1,//平台唯一
|
||
|
|
nCmsType: 12, //平台类型
|
||
|
|
strURL: paramvalue
|
||
|
|
}
|
||
|
|
login(initParam, function(params) {
|
||
|
|
if (params == 'success') {
|
||
|
|
//alert('登陆成功');
|
||
|
|
var thirdsyscode = GetUrlParam("thirdsyscode");//第三方编号
|
||
|
|
playOne(thirdsyscode);
|
||
|
|
} else {
|
||
|
|
alert('初始化失败');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<script language="javascript" FOR="commonVideoActiveX" EVENT="OnGetInstance(lIndex)">
|
||
|
|
// console.log('1.0登录成功,回调');
|
||
|
|
GetInstanceCallback.call(this, 'success');
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script language="javascript" FOR="commonVideoActiveX" EVENT="OnGetInstanceFailed(lIndex,error)">
|
||
|
|
// console.log('1.0登录失败,回调');
|
||
|
|
GetInstanceCallback.call(this, 'false');
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script language="javascript" FOR="commonVideoActiveX" EVENT="OnGetInstanceEx()">
|
||
|
|
// console.log('2.0登录成功,回调');
|
||
|
|
GetInstanceCallback.call(this, 'success');
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script language="javascript" FOR="commonVideoActiveX" EVENT="OnGetInstanceFailedEx(error)">
|
||
|
|
// console.log('2.0登录失败,回调');
|
||
|
|
GetInstanceCallback.call(this, 'false');
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body scroll="no" onload="this.initMDSParam()">
|
||
|
|
<object id="commonVideoActiveX" classid="clsid:A8B6BBF3-DA78-4BCB-ABAB-FB0410A463E4" width=100% height=99%
|
||
|
|
codebase="/CommonCMSOCX.cab#version=1,0,0,1729" VIEWASTEXT>
|
||
|
|
</object>
|
||
|
|
</body>
|
||
|
|
</html>
|