anxiao_web/rtc/videoShareCode.html

53 lines
1.8 KiB
HTML
Raw Normal View History

2024-07-24 09:22:32 +08:00
<!DOCTYPE html>
<html>
<head>
<title>视频查看</title>
<meta charset="UTF-8"/>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Cache" content="no-cache">
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="dist/css/layui.css" />
<script src="jquery-1.11.1.js"></script>
<script src="AgoraRTC_N-4.11.0.js"></script>
<script src="agora-rtm-sdk-1.2.2.js"></script>
<script src="dist/layui.all.js"></script>
<!--给录像文件添加时间进度条-->
<script src="fix-webm-duration.js"></script>
</head>
<body
<!--视频显示-->
<div id="video">
<div id="agora_local"></div>
<div id="local-player" class="player"></div>
</div>
<!--当js文件发生变化的时候自动清除浏览器缓存,只要标签后面的v每次不一样浏览器就更新了阿-->
<script>
//创建一个script标签
function loadScriptString() {
var timeStamp=new Date().getTime();
var script = document.createElement("script"); //创建一个script标签
script.type = "module";
script.src=`js/videoShareCode.js?v=${timeStamp}`;
document.getElementsByTagName('head')[0].appendChild(script);
}
//创建一个link标签
function loadLinkString(){
var timeStamp=new Date().getTime();
var css = document.createElement("link"); //创建一个script标签
css.rel = "stylesheet";
css.href=`css/videoShareCode.css?v=${timeStamp}`
document.getElementsByTagName('head')[0].appendChild(css);
$("#video").css("height","720px");
}
loadScriptString();
loadLinkString();
</script>
</body>
</html>