2019-06-12 12:35:44 +00:00
|
|
|
{% macro videoSrc(talk) %}
|
|
|
|
{# TODO: Cleanup once videos have been added to talks properly. #}
|
|
|
|
{% if talk.youtube %}
|
|
|
|
{% set videoType = 'youtube' %}
|
|
|
|
{% set videoId = talk.youtube.id %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if talk.vimeo %}
|
|
|
|
{% set videoType = 'vimeo' %}
|
|
|
|
{% set videoId = talk.vimeo.id %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if talk.video %}
|
|
|
|
{% set videoType = talk.video.type %}
|
|
|
|
{% set videoId = talk.video.id %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set srcUrls = {
|
|
|
|
youtube: '//www.youtube.com/embed',
|
|
|
|
videopress: 'https://videopress.com/embed',
|
|
|
|
vimeo: 'https://player.vimeo.com/video',
|
|
|
|
} %}
|
|
|
|
|
|
|
|
{{ srcUrls[videoType] ~ '/' ~ videoId }}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% from _self import videoSrc %}
|
|
|
|
|
|
|
|
{# TODO: Cleanup once videos have been added to talks properly. #}
|
|
|
|
{% if page.youtube.id or page.vimeo.id or page.video %}
|
2019-05-30 22:05:39 +00:00
|
|
|
<div class="mt-4">
|
2019-01-05 01:37:19 +00:00
|
|
|
<h2 class="mb-2">Video</h2>
|
2017-09-05 17:37:41 +00:00
|
|
|
|
2019-05-30 22:05:39 +00:00
|
|
|
<div class="video-full">
|
2019-06-12 12:35:44 +00:00
|
|
|
<iframe
|
|
|
|
width="678"
|
|
|
|
height="408"
|
|
|
|
src="{{ videoSrc(page) }}"
|
|
|
|
frameborder="0"
|
|
|
|
allowfullscreen
|
|
|
|
>
|
|
|
|
</iframe>
|
2017-09-05 17:37:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|