{% load teleforma_tags %}
{% load i18n %}
+
+{% block extra_javascript %}
+{{ block.super }}
+
+<script type="text/javascript">
+ function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
+
+ jQuery(window).ready(function() {
+ let video = $("#video");
+ let videoSource = $("#video source");
+ let url = videoSource.attr("src");
+ url = url + "?v=" + getRndInteger(1, 10000);
+ videoSource.attr("src", url);
+ let autoplayVideo = $("#videoclip").get(0);
+ autoplayVideo.load();
+ autoplayVideo.play();
+ });
+</script>
+
+{% endblock %}
+
+
{% block module-action %}
{% get_telecaster as telecaster %}
{% if telecaster %}
{% for livestream in livestreams %}
{% if "webm" == livestream.stream_type %}
<div class="video">
- <video width="100%" height="auto" controls>
- <source src="{{ livestream.url|get_host:host }}" type="video/webm" />
+ <video id="video" width="100%" height="auto" controls>
+ <source id="videosource" src="{{ livestream.url|get_host:host }}" type="video/webm" />
</video>
</div>
{% endif %}