[Glitch] Add customizable thumbnails for audio and video attachments

Port 64aac30733 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
Eugen Rochko
2020-06-29 13:56:55 +02:00
committed by ThibG
parent 8999eea707
commit 9b3677d509
3 changed files with 33 additions and 15 deletions

View File

@ -591,7 +591,8 @@ class Status extends ImmutablePureComponent {
<Component
src={attachment.get('url')}
alt={attachment.get('description')}
poster={status.getIn(['account', 'avatar_static'])}
poster={attachment.get('preview_url') || status.getIn(['account', 'avatar_static'])}
blurhash={attachment.get('blurhash')}
duration={attachment.getIn(['meta', 'original', 'duration'], 0)}
width={this.props.cachedMediaWidth}
height={110}