[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>
This commit is contained in:
tobi
2022-12-17 05:38:56 +01:00
committed by GitHub
parent 0f38e7c9b0
commit 2bbc64be43
39 changed files with 6276 additions and 93 deletions

View File

@@ -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
}