<div class="video {{#ifEquals videoAspect 'portrait'}}video--portrait{{/ifEquals}}" {{#unless doNotInitialise}}data-module="video"{{/unless}} data-autoplay="{{autoplay}}" data-hide-controls="{{hideControls}}" data-loop="{{loop}}" data-muted="{{muted}}">
    <template class="js-small-video-template">
        <div
            class="js-video-container video__container"
            {{#if video.mobileDashUrl}}
                data-dash-url="{{video.mobileDashUrl}}"
            {{else}}
                {{#if video.posterUrl}}
                    data-poster-url="{{video.posterUrl}}"
                {{/if}}
            {{/if}}>
            <video class="video__player js-video-player"
            {{#unless hideControls}}controls{{/unless}}
            {{#if autoplay}}autoplay muted{{else}}{{#if muted}}muted{{/if}}{{/if}}
            playsinline
            {{#if loop}}loop{{/if}}
            {{#if video.posterUrl}}poster="{{video.posterUrl}}"{{/if}}
            >
            {{#if video.mobileDashUrl}}
                {{#if video.mobileHlsUrl}}
                <source src="{{video.mobileHlsUrl}}" type="{{video.hlsVideoType}}" />
                {{/if}}
            {{else}}
                {{#if video.mobileVideoUrls}}
                {{#each video.mobileVideoUrls}}
                    <source src="{{url}}" type="{{type}}" />
                {{/each}}
                {{/if}}
            {{/if}}
            </video>
        </div>
    </template>
    <template class="js-medium-video-template">
        <div
            class="js-video-container video__container"
            {{#if video.dashUrl}}
                data-dash-url="{{video.dashUrl}}"
            {{else}}
                {{#if video.posterUrl}}
                    data-poster-url="{{video.posterUrl}}"
                {{/if}}
            {{/if}}>
            <video class="video__player js-video-player"
            {{#unless hideControls}}controls{{/unless}}
            {{#if autoplay}}autoplay muted{{else}}{{#if muted}}muted{{/if}}{{/if}}
            playsinline
            {{#if loop}}loop{{/if}}
            {{#if video.posterUrl}}poster="{{video.posterUrl}}"{{/if}}
            >
            {{#if video.dashUrl}}
                {{#if video.hlsUrl}}
                <source src="{{video.hlsUrl}}" type="{{video.hlsVideoType}}" />
                {{/if}}
            {{else}}
                {{#if video.videoUrls}}
                {{#each video.videoUrls}}
                    <source src="{{url}}" type="{{type}}" />
                {{/each}}
                {{/if}}
            {{/if}}
            </video>
        </div>
    </template>
    <div class="js-video-container video__container"></div>
    {{#if tags}}
    {{> @cp-hashtags tags }}
    {{/if}}
</div>