mirror of https://github.com/Siphonay/mastodon
Fix video player not being displayed in reports interface (#26801)
This commit is contained in:
parent
b749de766f
commit
ea7de25de0
|
@ -14,6 +14,7 @@ module MediaComponentHelper
|
||||||
blurhash: video.blurhash,
|
blurhash: video.blurhash,
|
||||||
frameRate: meta.dig('original', 'frame_rate'),
|
frameRate: meta.dig('original', 'frame_rate'),
|
||||||
inline: true,
|
inline: true,
|
||||||
|
aspectRatio: "#{meta.dig('original', 'width')} / #{meta.dig('original', 'height')}",
|
||||||
media: [
|
media: [
|
||||||
serialize_media_attachment(video),
|
serialize_media_attachment(video),
|
||||||
].as_json,
|
].as_json,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- if status.ordered_media_attachments.first.video?
|
- if status.ordered_media_attachments.first.video?
|
||||||
- video = status.ordered_media_attachments.first
|
= render_video_component(status, visible: false)
|
||||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), frameRate: video.file.meta.dig('original', 'frame_rate'), blurhash: video.blurhash, sensitive: status.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description, lang: status.language, media: [ActiveModelSerializers::SerializableResource.new(video, serializer: REST::MediaAttachmentSerializer)].as_json
|
|
||||||
- elsif status.ordered_media_attachments.first.audio?
|
- elsif status.ordered_media_attachments.first.audio?
|
||||||
- audio = status.ordered_media_attachments.first
|
- audio = status.ordered_media_attachments.first
|
||||||
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, lang: status.language, duration: audio.file.meta.dig(:original, :duration)
|
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, lang: status.language, duration: audio.file.meta.dig(:original, :duration)
|
||||||
|
|
Loading…
Reference in New Issue