Else if audio. Let's get an idea of what this could look like first.

This commit is contained in:
Sean King
2020-06-18 20:03:44 +00:00
parent 7e1457bb8d
commit 409340a2a6

View File

@ -48,6 +48,22 @@ export default class StatusCheckBox extends React.PureComponent {
)}
</Bundle>
);
} else if (status.getIn(['media_attacjments', 0, 'type']) === 'audio') {
const audio = status.getIn(['media_attachments', 0]);
media = (
<Bundle fetchComponent={Audio} loading={this.renderLoadingAudioPlayer} >
{Component => (
<Component
src={audio.get('url')}
alt={audio.get('description')}
inline
sensitive={status.get('sensitive')}
onOpenAudio={noop}
/>
)}
</Bundle>
);
} else {
media = (
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} >