Changeset - d5ed80882ed7
[Not reviewed]
0 1 2
Brett Smith - 3 years ago 2019-02-04 08:09:59
brettcsmith@brettcsmith.org
Add livestream.
2 files changed:
0 comments (0 inline, 0 general)
pinaxcon/templates/static_pages/livestream/index.html
Show inline comments
 
new file 100644
 
{% extends "site_base_home.html" %}
 

	
 
{% load i18n %}
 
{% load staticfiles %}
 
{% load thumbnail %}
 
{% load sponsorship_tags %}
 
{% load schedule_tags %}
 

	
 
{% block body_class %}home{% endblock %}
 

	
 
{% block body %}
 

	
 
<div class="chunkfive tight-headings text-center" style="padding: 1.5em;">
 
<h1>CopyleftConf Livestream</h1>
 
</div>
 

	
 
<div class="center-block">
 

	
 
    <h3 class="text-center chunkfive">Ada Lovelace (Main Stage)</h3>
 
    <div id="player0"></div>
 
    <p>
 
      Direct link: <a href="https://stream.fosdem.org/ua2220.m3u8">https://stream.fosdem.org/ua2220.m3u8</a>
 
    </p>
 
    <h3 class="text-center chunkfive">Hedy Lamarr</h3>
 
    <div id="player5"></div>
 
    <p>
 
      Direct link: <a href="https://stream.fosdem.org/k3201.m3u8">https://stream.fosdem.org/k3201.m3u8</a>
 
    </p>
 
    <h3 class="text-center chunkfive">Grace Hopper</h3>
 
    <div id="player2"></div>
 
    <p>
 
      Direct link: <a href="https://stream.fosdem.org/aw1120.m3u8">https://stream.fosdem.org/aw1120.m3u8</a>
 
    </p>
 
    <script type="text/javascript" src='{% static "js/clappr.min.js" %}'></script>
 
    <script>
 
      var player0 = new Clappr.Player({
 
      source: "https://stream.fosdem.org/ua2220.m3u8",
 
      baseUrl: "/asset/clappr",
 
      parentId: "#player0",
 
      autoPlay: true,
 

	
 
      hlsjsConfig: {
 
      xhrSetup: function(xhr, url) {
 
      xhr.onerror = function() {
 
      player0.stop();
 
      setTimeout(function(){
 
      player0.play();
 
      }, 5000);}}}});
 

	
 
      player0.on(Clappr.Events.PLAYER_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/ua2220.m3u8");
 
      });
 

	
 
      player0.on(Clappr.Events.PLAYBACK_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/ua2220.m3u8");
 
      });
 

	
 
      var player5 = new Clappr.Player({
 
      source: "https://stream.fosdem.org/k3201.m3u8",
 
      baseUrl: "/asset/clappr",
 
      parentId: "#player5",
 
      autoPlay: true,
 

	
 
      hlsjsConfig: {
 
      xhrSetup: function(xhr, url) {
 
      xhr.onerror = function() {
 
      player5.stop();
 
      setTimeout(function(){
 
      player5.play();
 
      }, 5000);}}}});
 

	
 
      player5.on(Clappr.Events.PLAYER_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/k3201.m3u8");
 
      });
 

	
 
      player5.on(Clappr.Events.PLAYBACK_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/k3201.m3u8");
 
      });
 

	
 
      var player2 = new Clappr.Player({
 
      source: "https://stream.fosdem.org/aw1120.m3u8",
 
      baseUrl: "/asset/clappr",
 
      parentId: "#player2",
 
      autoPlay: true,
 

	
 
      hlsjsConfig: {
 
      xhrSetup: function(xhr, url) {
 
      xhr.onerror = function() {
 
      player2.stop();
 
      setTimeout(function(){
 
      player2.play();
 
      }, 5000);}}}});
 

	
 
      player2.on(Clappr.Events.PLAYER_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/aw1120.m3u8");
 
      });
 

	
 
      player2.on(Clappr.Events.PLAYBACK_ERROR, function() {
 
      console.log('retry');
 
      //player.load("https://stream.fosdem.org/aw1120.m3u8");
 
      });
 

	
 
    </script>
 

	
 
{% endblock %}
pinaxcon/urls.py
Show inline comments
...
 
@@ -15,6 +15,7 @@ DONATE_REDIRECT = RedirectView.as_view(url='https://sfconservancy.org/donate/')
 

	
 
urlpatterns = [
 
    url(r"^$", TemplateView.as_view(template_name="static_pages/homepage.html"), name="home"),
 
    url(r"^livestream$", TemplateView.as_view(template_name="static_pages/livestream/index.html"), name="livestream"),
 

	
 
    # about
 
    url(r"^about$", TemplateView.as_view(template_name="static_pages/about.html"), name="about"),

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)