{#snippet videoThumbnail(video: MediaVideo)} validateThumbnail(video, event)} onerror={() => useFallback(video)} class="size-full object-cover transition duration-300 group-hover:scale-[1.015] group-hover:opacity-85 motion-reduce:transition-none" /> {#if showBadges} {#if video.containsSpoilers} spoilers {/if} {video.type} {/if} {/snippet} {#each videos as video (video.id)} {@const videoPageUrl = video.recordAuthor && video.recordKey ? resolve('/videos/[actor]/[rkey]', { actor: video.recordAuthor, rkey: video.recordKey }) : null} {@const mediaName = showMediaTitles ? mediaTitle(video) : null} {@const videoMediaUrl = mediaName ? mediaPageUrl(video) : null}
{#if videoPageUrl} {@render videoThumbnail(video)} {:else} {/if} {#if videoPageUrl} {video.name} {:else} {video.name} {/if} {#if mediaName} {#if videoMediaUrl} {mediaName} {:else} {mediaName} {/if} {/if}
{/each}
{#if selectedVideo && embedUrl} {selectedVideo.name} YouTube video for {title}. Press Escape or click outside the player to close.
{/if}