]> git.parisson.com Git - teleforma.git/commitdiff
add random hash
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 23 Jan 2023 19:44:36 +0000 (20:44 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 23 Jan 2023 19:44:36 +0000 (20:44 +0100)
teleforma/templates/teleforma/course_conference.html
teleforma/templatetags/teleforma_tags.py

index 144c896dc50d64c9ca6f4304508e99a3ed5c7fcb..e83b162b0bed9971f9319fdff0f735186b1576f0 100644 (file)
@@ -53,7 +53,7 @@
 <div class="video">
 <video width="640" height="360" controls autoplay preload="auto">
 <!-- Hello Chrome and Firefox (and Opera?) -->
-<source src="{{ livestream.url|set_host:host }}#{% random_hash %}" type="video/webm" />
+<source src="{{ livestream.url|set_host:host }}?v={% random_hash %}" type="video/webm" />
 </video>
 </div>
 {% endif %}
index d96adcf7dac18b9292bf93c5beb0fa4021b2caaa..b2f8a36a7d39fa02e82c9d5d34117228eb52cc56 100644 (file)
@@ -201,4 +201,8 @@ def set_host(url, host):
 
 @register.tag
 def random_hash(parser, token):
-    return get_random_hash()
+    return RandomHash()
+
+class RandomHash(template.Node):
+    def render(self, context):
+        return get_random_hash()