From 2bbc64be4317166d3abb7aa177d4913f166a53e8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 17 Dec 2022 05:38:56 +0100 Subject: [feature] Enable basic video support (mp4 only) (#1274) * [feature] basic video support * fix missing semicolon * replace text shadow with stacked icons Co-authored-by: f0x --- internal/media/types.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'internal/media/types.go') diff --git a/internal/media/types.go b/internal/media/types.go index b855d72b5..e7edfe643 100644 --- a/internal/media/types.go +++ b/internal/media/types.go @@ -34,6 +34,7 @@ const maxFileHeaderBytes = 261 // mime consts const ( mimeImage = "image" + mimeVideo = "video" mimeJpeg = "jpeg" mimeImageJpeg = mimeImage + "/" + mimeJpeg @@ -46,6 +47,9 @@ const ( mimeWebp = "webp" mimeImageWebp = mimeImage + "/" + mimeWebp + + mimeMp4 = "mp4" + mimeVideoMp4 = mimeVideo + "/" + mimeMp4 ) type processState int32 @@ -128,3 +132,12 @@ type DataFunc func(ctx context.Context) (reader io.ReadCloser, fileSize int64, e // // This can be set to nil, and will then not be executed. type PostDataCallbackFunc func(ctx context.Context) error + +type mediaMeta struct { + width int + height int + size int + aspect float64 + blurhash string + small []byte +} -- cgit v1.2.3