|
|
|
@ -131,14 +131,14 @@ export default class DetailedStatus extends ImmutablePureComponent { |
|
|
|
|
} else if (status.get('media_attachments').size > 0) { |
|
|
|
|
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) { |
|
|
|
|
media = <AttachmentList media={status.get('media_attachments')} />; |
|
|
|
|
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { |
|
|
|
|
const video = status.getIn(['media_attachments', 0]); |
|
|
|
|
} else if (['video', 'audio'].includes(status.getIn(['media_attachments', 0, 'type']))) { |
|
|
|
|
const attachment = status.getIn(['media_attachments', 0]); |
|
|
|
|
media = ( |
|
|
|
|
<Video |
|
|
|
|
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'])} |
|
|
|
|