嵌入測試工具--demo編寫:
http://e.vhall.com/home/vhallapi/embed
背景:此前的嵌入測試,存在缺少demo,直接測試嵌入地址,與客戶使用場景不符,導致測試不全的情況。
價值:藉助參考嵌入指南寫的demo進行嵌入頁的功能和兼容性測試。
操作說明:
以下嵌入測試demo,部署在測試環境,地址如下,後面的url爲你想嵌入的任意地址
http://172.16.**************:8000/iframe/?url=
示例如下:
視頻嵌入 http://172.16.11.200:8000/iframe/?url=https://live.v**************ituser/184454569?embed=video
完全嵌入 http://172.1**************:8000/iframe/?url=https://t-web**************inar/inituser/822771617
代碼如下
<html>
<head>
<title>
內嵌測試專用頁面--觀看端
</title>
<style>
*{margin:0;padding:0}
</style>
</head>
<body>
<iframe id="demo-iframe" allow="microphone;camera" border="0" src="" width="100%" height="100%" style="border: none;"></iframe>
<script>
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return '';
}
document.getElementById('demo-iframe').src=getQueryString('url');
</script>
</body>
</html>
路由配置