fresh.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {% extends "/html/base.html" %}
  2. {%block subtitle %}: {{page.title}}{% endblock %}
  3. {% block head %}
  4. {% include "/html/partials/video-head-videojs.html" %}
  5. {% endblock %}
  6. {% block content %}
  7. <div id="custom-page">
  8. <div id="page-header">
  9. <h2>{{page.title}}</h2>
  10. </div>
  11. {% if page.toc %}{{page.toc|safe}}{% endif %}
  12. {{page.content|safe}}
  13. {% if page.video-yt-id %}
  14. <div id="whats-ispooge-live-video-yt" style="">
  15. <video id="video-player" width="640" height="360" class="video-js vjs-default-skin"
  16. controls poster="{{page.video-thumbnail-url}}" data-setyp='{"controls": "true", "loop": "false", "autoplay": "false", "preload": "false"}'>
  17. <source src="{{page.video-url}}" type="application/x-mpegURL">
  18. </source>
  19. <p class="vjs-no-js">The browser doesn't seem to support our video player... new browsers should.</p>
  20. </video>
  21. <script>
  22. var player = videojs('video-player');
  23. player.ready(function() {
  24. player.mediaSession();
  25. });
  26. //player.play();
  27. </script>
  28. </div>
  29. {% endif %}
  30. <script>
  31. var el = document.getElementById('whats_ispooge_live_video');
  32. var newEl = document.getElementById('whats-ispooge-live-video-yt');
  33. newEl.parentElement.replaceChild(newEl, el);
  34. </script>
  35. </div>
  36. {% endblock %}