]> git.parisson.com Git - teleforma.git/commitdiff
add ROUTER_IP to forward streams
authoryomguy <yomguy@parisson.com>
Wed, 5 Dec 2012 11:10:15 +0000 (12:10 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 5 Dec 2012 11:10:15 +0000 (12:10 +0100)
teleforma/views/core.py

index 625770445e3a63cf1967a87b5a62284eea96b0e7..70cc6c63fd6b88767ac24c2d7e89227abd697860 100644 (file)
@@ -416,7 +416,15 @@ class ConferenceRecordView(FormView):
         context['mime_type'] = 'video/webm'
         status = Status()
         status.update()
-        context['host'] = status.ip
+        
+        request_host = get_host(self.request)
+        local_host = status.ip
+        if request_host.split('.')[0] == local_host.split('.')[0]:
+            ip = local_host
+        else:
+            ip = settings.ROUTER_IP
+
+        context['host'] = ip
         context['hidden_fields'] = self.hidden_fields
         return context