12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>视频预览</title>
- <link href="./css/video.css" rel="stylesheet">
- <script src="./js/video.js"></script>
- <script src="./js/videojs-live.js"></script>
- <style>
- html,body{height:100%}
- * { box-sizing: initial }
- </style>
- </head>
- <body style="margin: 0;" onload="init()">
- <div id="video" class="video-coverInfo-template" style="width:100%;height:100%;">
-
- </div>
-
- <script type="text/javascript">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function init() {
- var url = window.location.search.substring(1);
- var vars = {}
- url.split("&").map((e) => {
- var att = e.split("=")
- vars[att[0]] = att[1]
- })
- url = vars['url']
- if(url != '')
- document.getElementById('video').innerHTML =
- '<video id="my_video_1" autoplay="autoplay" loop="loop" muted="muted" class="video-js vjs-default-skin" controls preload="auto"' +
- ' style="width:100%;height:100%" data-setup="{}"><source src="' + vars['url'] + '" type="application/x-mpegURL"></video>'
- else
- document.getElementById('video').innerHTML =
- '<img src="./image/nullVideo.png" style="position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);"/>'
- }
- </script>
- </body>
- </html>
|