[feature/frontend] Add player for audio files; use thumbnail for poster (#3099)

* [feature/frontend] Audio player for audio media types

* use video preview images for previews instead of video itself

* don't preload

* update tests for new zork status

* collapse media gallery into single row when small
This commit is contained in:
tobi
2024-07-15 11:47:57 +02:00
committed by GitHub
parent 16421f7576
commit 9efb11d848
26 changed files with 327 additions and 95 deletions

View File

@@ -299,8 +299,14 @@ func (p *ProcessingMedia) store(ctx context.Context) error {
// Extract image metadata from streams (if any),
// this will only exist for embedded album art.
width, height, _ := result.ImageMeta()
width, height, framerate, _ := result.EmbeddedImageMeta()
if width > 0 && height > 0 {
// Unlikely to need these but masto API includes them.
p.media.FileMeta.Original.Width = width
p.media.FileMeta.Original.Height = height
if framerate != 0 {
p.media.FileMeta.Original.Framerate = &framerate
}
// Determine thumbnail dimensions to use.
thumbWidth, thumbHeight := thumbSize(width, height)