]> git.parisson.com Git - teleforma.git/commitdiff
fix context localhost, audio url
authoryomguy <yomguy@parisson.com>
Thu, 6 Dec 2012 11:20:47 +0000 (12:20 +0100)
committeryomguy <yomguy@parisson.com>
Thu, 6 Dec 2012 11:20:47 +0000 (12:20 +0100)
teleforma/context_processors.py
teleforma/templates/teleforma/course_conference_audio.html

index 64aea0f4c8bce329e641d68e935897ef660fd8d3..fc5a0595303bc1ca73903004f7b383df4125fbd7 100644 (file)
@@ -23,7 +23,10 @@ def get_local_host():
                 local_ip = ip
                 break
         except:
-            local_ip = '127.0.0.1'    
+            continue
+
+    if not local_ip:
+        local_ip = '127.0.0.1'
     return local_ip
 
 
index 98427e3c9d3cf49484bfbe0a9fe0c50fd4bff977..a137aaf916269a5872006b45aba41fb4157ade04 100644 (file)
@@ -51,7 +51,7 @@
 <div class="audio" style="margin-top:1em;">
 <audio controls autoplay preload="auto">
 <!-- Hello Chrome and Firefox (and Opera?) -->
-<source src="{{ livestream.url|get_host:host }}" type="audio/mpeg" />
+<source src="{{ livestream.url|set_host:HOST }}" type="audio/mpeg" />
 </audio>
 </div>
 {% endif %}