index.html 915 B

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. </head>
  8. <body>
  9. <video
  10. id="video_source"
  11. style="width: 100vw; height: 100vh"
  12. controls=""
  13. autoplay=""
  14. name="media"
  15. >
  16. <source src="stream://example/test_video.mp4" type="video/mp4" />
  17. </video>
  18. <script>
  19. ;(function () {
  20. if (navigator.userAgent.includes('Windows')) {
  21. const video = document.getElementById('video_source')
  22. const sources = video.getElementsByTagName('source')
  23. // on windows the custom protocl should be the host
  24. // followed by the complete path
  25. sources[0].src = 'https://stream.example/test_video.mp4'
  26. video.load()
  27. }
  28. })()
  29. </script>
  30. </body>
  31. </html>