diff templates/sat_website/gallery.html @ 86:45770a652636

use source tag to display video (tip from Link Mauve)
author souliane <souliane@mailoo.org>
date Mon, 15 Jun 2015 15:30:27 +0200
parents d59bc45f83ca
children 4b4a5d7602f8
line wrap: on
line diff
--- a/templates/sat_website/gallery.html	Mon Jun 15 17:37:49 2015 +0200
+++ b/templates/sat_website/gallery.html	Mon Jun 15 15:30:27 2015 +0200
@@ -36,8 +36,9 @@
             {% for screenshot in row %}
                 <div class="col-md-4">
                     {% if screenshot.poster %}
-	                    <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls="controls" src="{{ screenshot.path }}" preload="none">
-	                    {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}{% endblocktrans %}
+                        <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none">
+                            <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'>
+                            {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
 	                    </video>
                     {% else %}
                         <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static screenshot.path %}">
@@ -78,9 +79,10 @@
                         {% for screenshot in screenshots %}
                             <div class="item{% if not forloop.counter0 %} active{% endif %}">
                                 {% if screenshot.poster %}
-	                                <video class="img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls="controls" src="{{ screenshot.path }}" preload="none">
-	                                {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}{% endblocktrans %}
-	                                </video>
+                                    <video class="img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none">
+                                        <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'>
+                                        {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
+                                    </video>
                                 {% else %}
                                     <img class="img-responsive" src="{% static screenshot.path %}">                            
                                 {% endif %}