embed.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; media-src 'self' https://*.googlevideo.com; {{ "img-src 'self' https://*.googleusercontent.com https://*.ggpht.com https://*.ytimg.com;" if not settings.proxy_images else "" }}">
  7. <title>{{ title }}</title>
  8. <link href="/youtube.com/static/favicon.ico" type="image/x-icon" rel="icon">
  9. {% if settings.use_video_player == 2 %}
  10. <!-- plyr -->
  11. <link href="/youtube.com/static/modules/plyr/plyr.css" rel="stylesheet">
  12. <!--/ plyr -->
  13. {% endif %}
  14. <style>
  15. body {
  16. margin: 0rem;
  17. padding: 0rem;
  18. }
  19. video {
  20. width: 100%;
  21. height: auto;
  22. }
  23. /* Prevent this div from blocking right-click menu for video
  24. e.g. Firefox playback speed options */
  25. .plyr__poster {
  26. display: none !important;
  27. }
  28. </style>
  29. {% if js_data %}
  30. <script>
  31. // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
  32. data = {{ js_data|tojson }};
  33. // @license-end
  34. </script>
  35. {% endif %}
  36. </head>
  37. <body>
  38. <video id="js-video-player" controls autofocus onmouseleave="{{ title }}"
  39. oncontextmenu="{{ title }}" onmouseenter="{{ title }}" title="{{ title }}">
  40. {% if uni_sources %}
  41. <source src="{{ uni_sources[uni_idx]['url'] }}" type="{{ uni_sources[uni_idx]['type'] }}" data-res="{{ uni_sources[uni_idx]['quality'] }}">
  42. {% endif %}
  43. {% for source in subtitle_sources %}
  44. {% if source['on'] %}
  45. <track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}" default>
  46. {% else %}
  47. <track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}">
  48. {% endif %}
  49. {% endfor %}
  50. </video>
  51. {% if js_data %}
  52. <script>
  53. // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
  54. data = {{ js_data|tojson }};
  55. // @license-end
  56. </script>
  57. {% endif %}
  58. <script>
  59. // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
  60. let storyboard_url = {{ storyboard_url | tojson }};
  61. // @license-end
  62. </script>
  63. {% if settings.use_video_player == 2 %}
  64. <!-- plyr -->
  65. <script src="/youtube.com/static/modules/plyr/plyr.min.js"
  66. integrity="sha512-l6ZzdXpfMHRfifqaR79wbYCEWjLDMI9DnROvb+oLkKq6d7MGroGpMbI7HFpicvmAH/2aQO+vJhewq8rhysrImw=="
  67. crossorigin="anonymous"></script>
  68. <script src="/youtube.com/static/js/plyr-start.js"></script>
  69. <!-- /plyr -->
  70. {% elif settings.use_video_player == 1 %}
  71. <script src="/youtube.com/static/js/hotkeys.js"></script>
  72. {% endif %}
  73. </body>
  74. </html>