{{- $block := .block -}} {{- $block_class := partial "GetBlockClass" .block -}} {{- $block_index := .index -}} {{- $described_by_id := "" -}} {{- $video_id := printf "video-%d" $block_index -}} {{- with .block.data -}}
{{ partial "blocks/top.html" $block.top }} {{ if .url }} {{ $title := "video" }} {{ with .video_title }} {{ $title = . }} {{ end }} {{ if eq .layout "button" }} {{ $options := (dict "mode" "player" "videoId" $video_id "transcription" (printf "

%s

%s" .video_title .transcription) )}} {{ end }}
{{ if eq .video.platform "default" }} {{ partial "PrepareHTML" .video.iframe }} {{ else }} {{ partial "blocks/templates/video/lazy-container" .video }} {{ end }}
{{ end }} {{ if ne .layout "button" }} {{ if .video_title }} {{ $described_by_id = printf "block-video-title-%d" $block_index }} {{ end }} {{ partial "commons/transcription" ( dict "block_index" $block_index "described_by" $described_by_id "transcription" .transcription ) }} {{ end }}
{{- end -}}