{% set %} the display_type and display_path and use that elsewhere

This will make some stuff a bit cleaner that's coming up...

This commit sponsored by J B Nicholson-Owens.  Thanks!
This commit is contained in:
Christopher Allan Webber 2013-03-03 11:03:30 -06:00
parent 3ff006ef3b
commit 14814f217a

View File

@ -27,13 +27,14 @@
{%- 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.get_display_media()[1]) }}"
<source src="{{ request.app.public_store.file_url(display_path) }}"
type="video/webm; codecs=&quot;vp8, vorbis&quot;" />
<div class="no_html5">
{%- trans -%}Sorry, this video will not work because