diff options
author | 2022-12-17 05:38:56 +0100 | |
---|---|---|
committer | 2022-12-17 04:38:56 +0000 | |
commit | 2bbc64be4317166d3abb7aa177d4913f166a53e8 (patch) | |
tree | 88c3d613eb986b18894f311afa4291987a0e26c4 /internal/media/types.go | |
parent | [chore] fix some little config whoopsies (#1272) (diff) | |
download | gotosocial-2bbc64be4317166d3abb7aa177d4913f166a53e8.tar.xz |
[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 <f0x@cthu.lu>
Diffstat (limited to 'internal/media/types.go')
-rw-r--r-- | internal/media/types.go | 13 |
1 files changed, 13 insertions, 0 deletions
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 +} |