aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-03-04 11:45:27 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-03-04 11:45:27 -0600
commit55c7bf592c07e560fd38943eba4ed2f538cc4bb4 (patch)
treeaefcd279d509ce9eb4edb8009fdf0c2ad91f7d90 /mediagoblin/templates
parente9b69c7d0eb00426ee06e4d83f8e1841b421deb2 (diff)
parent5302477671e4ef65e35baa1e5b868c4dae4a35c7 (diff)
downloadmediagoblin-55c7bf592c07e560fd38943eba4ed2f538cc4bb4.tar.lz
mediagoblin-55c7bf592c07e560fd38943eba4ed2f538cc4bb4.tar.xz
mediagoblin-55c7bf592c07e560fd38943eba4ed2f538cc4bb4.zip
Merge branch 'joar-skip_transcoding'
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/stl.html2
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/video.html37
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html2
3 files changed, 28 insertions, 13 deletions
diff --git a/mediagoblin/templates/mediagoblin/media_displays/stl.html b/mediagoblin/templates/mediagoblin/media_displays/stl.html
index 043faac8..a89e0b4f 100644
--- a/mediagoblin/templates/mediagoblin/media_displays/stl.html
+++ b/mediagoblin/templates/mediagoblin/media_displays/stl.html
@@ -23,7 +23,7 @@
{% set model_download = request.app.public_store.file_url(
- media.get_display_media(media.media_files)) %}
+ media.media_files['original']) %}
{% set perspective_view = request.app.public_store.file_url(
media.media_files['perspective']) %}
{% set top_view = request.app.public_store.file_url(
diff --git a/mediagoblin/templates/mediagoblin/media_displays/video.html b/mediagoblin/templates/mediagoblin/media_displays/video.html
index 9eeb7c85..b0854c9f 100644
--- a/mediagoblin/templates/mediagoblin/media_displays/video.html
+++ b/mediagoblin/templates/mediagoblin/media_displays/video.html
@@ -22,19 +22,24 @@
{{ super() }}
<script type="text/javascript" src="{{
request.staticdirect('/extlib/video-js/video.min.js') }}"></script>
- <link href="{{ request.staticdirect('/css/vjs-mg-skin.css')
- }}" rel="stylesheet">
+ <link href="{{ request.staticdirect('/css/vjs-mg-skin.css') }}"
+ rel="stylesheet">
{%- endblock %}
{% block mediagoblin_media %}
+ {% set display_type, display_path = media.get_display_media() %}
+
<video controls
{% if global_config['media_type:mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
preload="auto" class="video-js vjs-mg-skin"
- data-setup='{"height": {{ media.media_data.height }},
- "width": {{ media.media_data.width }} }'>
- <source src="{{ request.app.public_store.file_url(
- media.media_files['webm_640']) }}"
- type="video/webm; codecs=&quot;vp8, vorbis&quot;" />
+ data-setup='{"height": {{ media.media_data.height }},
+ "width": {{ media.media_data.width }} }'>
+ <source src="{{ request.app.public_store.file_url(display_path) }}"
+ {% if media.media_data %}
+ type="{{ media.media_data.source_type() }}"
+ {% else %}
+ type="{{ media.media_manager['default_webm_type'] }}"
+ {% endif %} />
<div class="no_html5">
{%- trans -%}Sorry, this video will not work because
your web browser does not support HTML5
@@ -50,10 +55,20 @@
<h3>{% trans %}Download{% endtrans %}</h3>
<ul>
{% if 'original' in media.media_files %}
- <li><a href="{{ request.app.public_store.file_url(
- media.media_files.original) }}">{% trans %}Original file{% endtrans %}</a>
+ <li>
+ <a href="{{ request.app.public_store.file_url(
+ media.media_files.original) }}">
+ {%- trans %}Original file{% endtrans -%}
+ </a>
+ </li>
+ {% endif %}
+ {% if 'webm_640' in media.media_files %}
+ <li>
+ <a href="{{ request.app.public_store.file_url(
+ media.media_files.webm_640) }}">
+ {%- trans %}WebM file (640p; VP8/Vorbis){% endtrans -%}
+ </a>
+ </li>
{% endif %}
- <li><a href="{{ request.app.public_store.file_url(
- media.media_files.webm_640) }}">{% trans %}WebM file (640p; VP8/Vorbis){% endtrans %}</a>
</ul>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index f151c577..b77c12b9 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -47,7 +47,7 @@
<div class="media_image_container">
{% block mediagoblin_media %}
{% set display_media = request.app.public_store.file_url(
- media.get_display_media(media.media_files)) %}
+ media.get_display_media()[1]) %}
{# if there's a medium file size, that means the medium size
# isn't the original... so link to the original!
#}