| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <!DOCTYPE html>
- <html lang=zh-CN>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="divport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
- <title>uni-app h5平台在电脑浏览器打开解决方案</title>
- <meta name="Copyright" content="helang">
- <link rel="shortcut icon" type="image/png" href="/uniapp-extend/static/logo.png">
- <meta name="keywords" content="黄河爱浪,WEB前端河浪,jQuery插件开发者河浪">
- <meta name="description" content="公众号:web-7258,QQ:1846492969,邮箱:helang.love@qq.com">
- <style type="text/css">
- body {
- margin: 0;
- background-color: #f3f3f3;
- }
- iframe {
- width: 375px;
- height: 667px;
- background-color: #fff;
- box-sizing: content-box;
- border: none;
- }
- @media screen and (min-width: 450px) {
- iframe {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- margin: auto;
- border: rgba(0, 0, 0, 0.7) solid 10px;
- border-radius: 4px;
- }
- }
- </style>
- <script type="text/javascript" src="./js/ezuikit.js"></script>
- <script type="text/javascript">
- window.onload = function() {
- /* 监听电脑浏览器窗口尺寸改变 */
- // window.onresize = function(){
- // /* 窗口宽度 小于或等于420px 时,跳转回H5页面 */
- // if(window.innerWidth <= 420){
- // // window.location.pathname = '/uniapp-extend';
- // /* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
- // // window.location.pathname = '';
- // }
- //
-
- var obj=JSON.parse(localStorage.getItem('obj'))
- console.log(obj)
- var accessToken=obj.accessToken
- var device_id=obj.device_id
- // let name = window.parent.document.getElementsByTagName("iframe")[0].baseURI; //需要iframe的ID
-
- // console.log(name)
- setTimeout(() => {
- var url = "ezopen://open.ys7.com/"+device_id+"/1.hd.live"
- var player = new EZUIKit.EZUIPlayer({
- id: 'myPlayer',
- url: url,
- autoplay: true,
- accessToken: accessToken,
- decoderPath: 'js/',
- width: 600,
- height: 400,
- });
- player.play();
- }, 500)
- }
- </script>
- </head>
- <body>
- <!-- <iframe src="/uniapp-extend"></iframe> -->
- <div id="myPlayer"></div>
- <div class="btn-box">
- <div class="more" @touchstart="configCamera('move', 8)" @touchend="stopConfigCamera()">
- <!-- <image src="" :src="moreSrc" mode="widthFix"></image> -->
- </div>
- <div class="direc">
- <div class="top" @touchstart="configCamera('move', 0)" @touchend="stopConfigCamera()">
-
- </div>
- <div class="bottom" @touchstart="configCamera('move', 1)" @touchend="stopConfigCamera()">
-
- </div>
- <div class="photo" @touchstart="configCamera('takephoto', '')" >
-
- </div>
- <div class="left" @touchstart="configCamera('move', 2)" @touchend="stopConfigCamera()">
-
- </div>
- <div class="right" @touchstart="configCamera('move', 6)" @touchend="stopConfigCamera()">
-
- </div>
- </div>
- <div class="less" @touchstart="configCamera('move', 9)" @touchend="stopConfigCamera()">
- <image :src="lessSrc" mode="widthFix"></image>
- </div>
- </div>
- <!--
- 若你的项目未设置根目录(默认为 / 时),则使用下方代码
- <iframe src="/"></iframe>
- -->
- </body>
- </html>
|