fix(components/media): Autoplay and blurhash (#1400)

Fixes https://github.com/nolanlawson/pinafore/issues/1399.
This commit is contained in:
Sorin Davidoi 2019-08-18 19:29:03 +02:00 committed by Nolan Lawson
parent 823a7abebf
commit 94cf7df954

View file

@ -43,7 +43,7 @@
title={description} title={description}
on:mouseover="set({mouseover: event})" on:mouseover="set({mouseover: event})"
style="width: {inlineWidth}px; height: {inlineHeight}px;"> style="width: {inlineWidth}px; height: {inlineHeight}px;">
{#if type === 'gifv' && $autoplayGifs} {#if type === 'gifv' && $autoplayGifs && !blurhash}
<AutoplayVideo <AutoplayVideo
ariaLabel="Animated GIF: {description}" ariaLabel="Animated GIF: {description}"
poster={previewUrl} poster={previewUrl}
@ -52,7 +52,7 @@
height={inlineHeight} height={inlineHeight}
{focus} {focus}
/> />
{:elseif type === 'gifv' && !$autoplayGifs} {:elseif type === 'gifv'}
<NonAutoplayGifv <NonAutoplayGifv
class={noNativeWidthHeight ? 'no-native-width-height' : ''} class={noNativeWidthHeight ? 'no-native-width-height' : ''}
label="Animated GIF: {description}" label="Animated GIF: {description}"