logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: f36d62179c5f86f5e39563c8c32c02b12205a43f
parent: c74285b0d7313288154a4959fe02dd11927c9e7e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 17 Apr 2018 18:41:21 +0200

app/javascript/mastodon/components/media_gallery.js: [WIP] Add support for audio attachements

Diffstat:

Mapp/javascript/mastodon/components/media_gallery.js12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js @@ -145,6 +145,18 @@ class Item extends React.PureComponent { /> </a> ); + } else if (attachment.get('type') === 'audio') { + thumbnail = ( + <div className='media-gallery__audio'> + <audio + className='media-gallery__item-audio-thumbnail' + aria-label={attachment.get('description')} + role='application' + src={attachment.get('url')} + loop + /> + </div> + ); } else if (attachment.get('type') === 'gifv') { const autoPlay = !isIOS() && autoPlayGif;