{% 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:
parent
3ff006ef3b
commit
14814f217a
@ -27,13 +27,14 @@
|
|||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
|
|
||||||
{% block mediagoblin_media %}
|
{% block mediagoblin_media %}
|
||||||
|
{% set display_type, display_path = media.get_display_media() %}
|
||||||
|
|
||||||
<video controls
|
<video controls
|
||||||
{% if global_config['media_type:mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
{% if global_config['media_type:mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
||||||
preload="auto" class="video-js vjs-mg-skin"
|
preload="auto" class="video-js vjs-mg-skin"
|
||||||
data-setup='{"height": {{ media.media_data.height }},
|
data-setup='{"height": {{ media.media_data.height }},
|
||||||
"width": {{ media.media_data.width }} }'>
|
"width": {{ media.media_data.width }} }'>
|
||||||
<source src="{{ request.app.public_store.file_url(
|
<source src="{{ request.app.public_store.file_url(display_path) }}"
|
||||||
media.get_display_media()[1]) }}"
|
|
||||||
type="video/webm; codecs="vp8, vorbis"" />
|
type="video/webm; codecs="vp8, vorbis"" />
|
||||||
<div class="no_html5">
|
<div class="no_html5">
|
||||||
{%- trans -%}Sorry, this video will not work because
|
{%- trans -%}Sorry, this video will not work because
|
||||||
|
Loading…
x
Reference in New Issue
Block a user