diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-21 22:59:44 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 03:42:29 -0600 |
commit | 9e534aad191af5209e2f08183cad6b25cba34a93 (patch) | |
tree | 2f4e8bdbc6b3b03c5c7a952e00a1bc44a6d86cb8 | |
parent | 2dacf79bcc58094b58f1689189ce130fb34b2c8f (diff) |
Change audio format from ogg to mp3 for wider compatibility (#11141)
* Change audio format from ogg to mp3 for wider compatibility * Add media description as title to links of unknown media attachments
-rw-r--r-- | app/javascript/mastodon/components/media_gallery.js | 2 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/components.scss | 1 | ||||
-rw-r--r-- | app/models/media_attachment.rb | 10 |
3 files changed, 9 insertions, 4 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 56618462b..77bac61ee 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -157,7 +157,7 @@ class Item extends React.PureComponent { if (attachment.get('type') === 'unknown') { return ( <div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={{ left: left, top: top, right: right, bottom: bottom, width: `${width}%`, height: `${height}%` }}> - <a className='media-gallery__item-thumbnail' href={attachment.get('remote_url')} target='_blank' style={{ cursor: 'pointer' }}> + <a className='media-gallery__item-thumbnail' href={attachment.get('remote_url')} target='_blank' style={{ cursor: 'pointer' }} title={attachment.get('description')}> <canvas width={32} height={32} ref={this.setCanvasRef} className='media-gallery__preview' /> </a> </div> diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index be8795534..b1b825829 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -567,6 +567,7 @@ .compose-form__upload-thumbnail { border-radius: 4px; + background-color: $base-shadow-color; background-position: center; background-size: cover; background-repeat: no-repeat; diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index ce3549539..e2a44d457 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -86,9 +86,13 @@ class MediaAttachment < ApplicationRecord AUDIO_STYLES = { original: { - format: 'ogg', - content_type: 'audio/ogg', - convert_options: {}, + format: 'mp3', + content_type: 'audio/mpeg', + convert_options: { + output: { + 'q:a' => 2, + }, + }, }, }.freeze |