83 lines
2.4 KiB
HTML
83 lines
2.4 KiB
HTML
|
|
<!doctype html>
|
|||
|
|
<html>
|
|||
|
|
|
|||
|
|
<head>
|
|||
|
|
<title></title>
|
|||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|||
|
|
<meta http-equiv="Pragma" content="no-cache" />
|
|||
|
|
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
|||
|
|
<meta http-equiv="Expires" content="0" />
|
|||
|
|
</head>
|
|||
|
|
<style type="text/css">
|
|||
|
|
html,
|
|||
|
|
body {
|
|||
|
|
margin: 0;
|
|||
|
|
padding: 0;
|
|||
|
|
border: 0;
|
|||
|
|
overflow: hidden;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.plugin {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
|
|||
|
|
<body>
|
|||
|
|
<div id="divPlugin" class="plugin"></div>
|
|||
|
|
</body>
|
|||
|
|
<script src="./codebase/jquery-1.7.1.min.js"></script>
|
|||
|
|
<script src="./codebase/encryption/AES.js"></script>
|
|||
|
|
<script src="./codebase/encryption/cryptico.min.js"></script>
|
|||
|
|
<script src="./codebase/encryption/crypto-3.1.2.min.js"></script>
|
|||
|
|
<script src="./codebase/jsPlugin-1.2.0.min.js"></script>
|
|||
|
|
<script src="./codebase/webVideoCtrl.js"></script>
|
|||
|
|
<script>
|
|||
|
|
var urlParams = new URLSearchParams(window.location.search);
|
|||
|
|
var type = urlParams.get('type');
|
|||
|
|
console.log(type)
|
|||
|
|
$(function () {
|
|||
|
|
var height = '100%';
|
|||
|
|
var width = $("body").width();
|
|||
|
|
if (type == "dialog") {
|
|||
|
|
width = $("body").width();
|
|||
|
|
height = '500';
|
|||
|
|
}
|
|||
|
|
if (type == "sanwei") {
|
|||
|
|
width = $("body").width();
|
|||
|
|
height = '230';
|
|||
|
|
}
|
|||
|
|
// ʼ
|
|||
|
|
WebVideoCtrl.I_InitPlugin(width, height, {
|
|||
|
|
bWndFull: true,//Ƿֵ֧˫ȫĬ֧ true:֧ false:֧
|
|||
|
|
iWndowType: 1,
|
|||
|
|
cbInitPluginComplete: function () {
|
|||
|
|
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
// 添加消息监听器
|
|||
|
|
window.addEventListener('message', function (event) {
|
|||
|
|
// 验证消息来源
|
|||
|
|
if (event.origin !== window.location.origin) {
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const data = event.data;
|
|||
|
|
if (data.type === 'messageFromParent') {
|
|||
|
|
console.log('Received message from parent:', data);
|
|||
|
|
// 处理接收到的消息
|
|||
|
|
if (data.data.type === 1) {
|
|||
|
|
// 处理夜间模式
|
|||
|
|
// TODO: 实现夜间模式相关逻辑
|
|||
|
|
} else {
|
|||
|
|
// 处理普通模式
|
|||
|
|
// TODO: 实现普通模式相关逻辑
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
</html>
|