[Glitch] Add color extraction for audio thumbnails

Port 99f3a55540 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
Eugen Rochko
2020-07-05 18:28:25 +02:00
committed by Thibaut Girka
parent ad73e05f46
commit 69cddc3909
6 changed files with 63 additions and 236 deletions

View File

@ -38,7 +38,9 @@ export default class AudioModal extends ImmutablePureComponent {
duration={media.getIn(['meta', 'original', 'duration'], 0)}
height={150}
poster={media.get('preview_url') || status.getIn(['account', 'avatar_static'])}
blurhash={media.get('blurhash')}
backgroundColor={media.getIn(['meta', 'colors', 'background'])}
foregroundColor={media.getIn(['meta', 'colors', 'foreground'])}
accentColor={media.getIn(['meta', 'colors', 'accent'])}
/>
</div>

View File

@ -329,7 +329,9 @@ class FocalPointModal extends ImmutablePureComponent {
duration={media.getIn(['meta', 'original', 'duration'], 0)}
height={150}
poster={media.get('preview_url') || account.get('avatar_static')}
blurhash={media.get('blurhash')}
backgroundColor={media.getIn(['meta', 'colors', 'background'])}
foregroundColor={media.getIn(['meta', 'colors', 'foreground'])}
accentColor={media.getIn(['meta', 'colors', 'accent'])}
editable
/>
)}