Allow Vimeo as well as YouTube URLs. Closes #26.

This commit is contained in:
2018-03-31 17:18:35 +11:00
parent 0f0f78bd24
commit 5f2941d205
4 changed files with 62 additions and 9 deletions

View File

@ -212,7 +212,13 @@ dd ul { padding-left: 0; margin-left: 0; }
<figure>
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/{{ case_study.get_video_id }}?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
{% if case_study.is_video_youtube %}
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/{{ case_study.get_youtube_id }}?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
{% elif case_study.is_video_vimeo %}
<iframe src="https://player.vimeo.com/video/{{ case_study.get_vimeo_id }}" width="560" height="315" frameborder="0" allowfullscreen></iframe>
{% else %}
{{ case_study.video }}
{% endif }
</div>
<figcaption>