<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 }}#{% get_random_hash %}" type="video/webm" />
+<source src="{{ livestream.url|set_host:host }}#{% random_hash %}" type="video/webm" />
</video>
</div>
{% endif %}
{% block video %}
<div class="video">
<video controls autoplay preload="auto" width="640" height="360">
-<source src="http://{{ host }}:8000/monitor.webm#{% get_random_hash %}" type="video/webm">
+<source src="http://{{ host }}:8000/monitor.webm#{% random_hash %}" type="video/webm">
</video>
</div>
{% endblock video %}
return u.scheme + '://' + host + ':' + str(u.port) + u.path
@register.tag
-def get_random_hash(parser, token):
+def random_hash(parser, token):
return get_random_hash()