{% load wagtailembeds_tags %}
{% if embed.ratio %}
{# If an aspect ratio is included, use the appropriate Bootstrap 4 class #}
{% if embed.ratio > 0.9 %}
{% elif embed.ratio > 0.7 %}
{% elif embed.ratio > 0.5 %}
{% else %}
{% endif %}
{% else %}
{# Otherwise, center it in a row, for things like Tweets. #}
{% endif %}
{# Embed the video with an absurdly high max width. #}
{% embed embed.url max_width=3840 %}