demo-rtmp.html 1009 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta name="renderer" content="webkit">
  7. <title>RTMP播放协议</title>
  8. <style>
  9. body {
  10. margin: 0;
  11. }
  12. #myPlayer {
  13. max-width: 1200px;
  14. width: 100%;
  15. }
  16. </style>
  17. </head>
  18. <script>
  19. </script>
  20. <body>
  21. <script src="https://open.ys7.com/sdk/js/2.0/ezuikit.js"></script>
  22. <video id="myPlayer" controls playsInline webkit-playsinline autoplay>
  23. <source src="rtmp://rtmp.open.ys7.com/openlive/f01018a141094b7fa138b9d0b856507b.hd" type="rtmp/flv"/>
  24. </video>
  25. <script>
  26. var player = new EZuikit.EZUIPlayer('myPlayer');
  27. // 日志
  28. player.on('log', log);
  29. function log(str) {
  30. var div = document.createElement('DIV');
  31. div.innerHTML = (new Date()).Format('yyyy-MM-dd hh:mm:ss.S') + JSON.stringify(str);
  32. document.body.appendChild(div);
  33. }
  34. </script>
  35. </body>
  36. </html>