2
0

podcast.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends "/html/base.html" %}
  2. {%block subtitle %}: {{post.title}} on {{post.date|date:"MM.dd"}}{% endblock %}
  3. {% block content %}
  4. <div id="post">
  5. <img src="{{ post.cover-src}}" alt="cover image">
  6. <audio id="audioplayer" preload="auto" controls style="width:100%;" >
  7. <source src="{{ post.audio-src }}" type="audio/mp3">
  8. Your browser doesn't support the HTML audio tag. You can still download the show, though!
  9. </audio>
  10. <p id="audioplayer_1"></p>
  11. <script type="text/javascript">
  12. var audioTag = document.createElement('audio');
  13. /* Do we not support MP3 audio? If not, dynamically made a Flash SWF player. */
  14. if (!(!!(audioTag.canPlayType) && ("no" != audioTag.canPlayType("audio/mpeg")) && ("" != audioTag.canPlayType("audio/mpeg")))) {
  15. AudioPlayer.embed("audioplayer_1", {soundFile: "{{ post.audio-src }}", transparentpagebg: "yes"});
  16. $( '#audioplayer').hide();
  17. }
  18. else /* Ok, we do support MP3 audio, style the audio tag into a touch-friendly player */
  19. {
  20. /* If we didn't do the "if mp3 supported" check above, this call would prompt Firefox install quicktime! */
  21. $( '#audioplayer' ).audioPlayer();
  22. }
  23. </script>
  24. {% include "/html/post-content.html" %}
  25. {% include "/html/partials/post-pagination.html" %}
  26. {% if disqus-shortname %}
  27. <div id="disqus_thread"></div>
  28. <script type="text/javascript">
  29. var disqus_config = function () {
  30. this.page.url = "{{site-url}}{{uri}}";
  31. this.page.identifier = "{{post.title}}";
  32. };
  33. (function() {
  34. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  35. dsq.src = '//{{disqus-shortname}}.disqus.com/embed.js';
  36. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  37. })();
  38. </script>
  39. {% endif %}
  40. </div>
  41. {% endblock %}