play.html 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport"
  5. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  7. <title>视频认证</title>
  8. <style>
  9. body {
  10. margin: 0;
  11. background: #F5F6FA;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <div id='app'>
  17. <video width="320" height="240" controls id='srcSource'>
  18. </video>
  19. </div>
  20. </body>
  21. <script type="text/javascript" src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/jquery.min.js"></script>
  22. <script type="text/javascript">
  23. var src = getUrlParam("src")
  24. function getUrlParam(name) {
  25. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
  26. var r = window.location.search.substr(1).match(reg); //匹配目标参数
  27. if (r != null) return unescape(r[2]);
  28. return null; //返回参数值
  29. }
  30. console.log("src")
  31. console.log(src)
  32. $('#srcSource').attr("src",src)
  33. </script>
  34. </html>