<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 }}" type="video/webm" />
+<source src="{{ livestream.url|set_host:host }}#{% get_random_hash %}" type="video/webm" />
</video>
</div>
{% endif %}
from django.utils.translation import ugettext_lazy as _
from teleforma.views import get_courses
from urlparse import urlparse
+from teleforma.models import get_random_hash
+
register = template.Library()
u = urlparse(url)
return u.scheme + '://' + host + ':' + str(u.port) + u.path
+
+@register.assignment_tag
+def get_random_hash():
+ return get_random_hash()