diff options
author | Reverite <github@reverite.sh> | 2019-06-26 20:31:07 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-06-26 20:31:07 -0700 |
commit | 3fa90982efda2109ddf90d81f5ed3449f8282642 (patch) | |
tree | e5514f4c72c9ffb44059a2afb7fdf24d0348bbd4 /app/javascript/flavours/glitch/components/status.js | |
parent | 714940de498e93a8bf40dcda1835217df18741bf (diff) | |
parent | 9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/components/status.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/status.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index f6d73475a..ed2623ebb 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -521,16 +521,16 @@ export default class Status extends ImmutablePureComponent { media={status.get('media_attachments')} /> ); - } else if (attachments.getIn([0, 'type']) === 'video') { // Media type is 'video' - const video = status.getIn(['media_attachments', 0]); + } else if (['video', 'audio'].includes(attachments.getIn([0, 'type']))) { + const attachment = status.getIn(['media_attachments', 0]); media = ( <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} > {Component => (<Component - preview={video.get('preview_url')} - blurhash={video.get('blurhash')} - src={video.get('url')} - alt={video.get('description')} + preview={attachment.get('preview_url')} + blurhash={attachment.get('blurhash')} + src={attachment.get('url')} + alt={attachment.get('description')} inline sensitive={status.get('sensitive')} letterbox={settings.getIn(['media', 'letterbox'])} @@ -544,7 +544,7 @@ export default class Status extends ImmutablePureComponent { />)} </Bundle> ); - mediaIcon = 'video-camera'; + mediaIcon = attachment.get('type') === 'video' ? 'video-camera' : 'music'; } else { // Media type is 'image' or 'gifv' media = ( <Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}> |