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
This commit is contained in:
parent
8f23726918
commit
49ebda4d49
|
@ -157,7 +157,7 @@ class Item extends React.PureComponent {
|
||||||
if (attachment.get('type') === 'unknown') {
|
if (attachment.get('type') === 'unknown') {
|
||||||
return (
|
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}%` }}>
|
<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' />
|
<canvas width={32} height={32} ref={this.setCanvasRef} className='media-gallery__preview' />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -557,6 +557,7 @@
|
||||||
|
|
||||||
.compose-form__upload-thumbnail {
|
.compose-form__upload-thumbnail {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
background-color: $base-shadow-color;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
|
@ -69,9 +69,13 @@ class MediaAttachment < ApplicationRecord
|
||||||
|
|
||||||
AUDIO_STYLES = {
|
AUDIO_STYLES = {
|
||||||
original: {
|
original: {
|
||||||
format: 'ogg',
|
format: 'mp3',
|
||||||
content_type: 'audio/ogg',
|
content_type: 'audio/mpeg',
|
||||||
convert_options: {},
|
convert_options: {
|
||||||
|
output: {
|
||||||
|
'q:a' => 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue