Merge pull request #427 from hupfdule/master
Add support for Matroska (MKV) video container
This commit is contained in:
commit
2e4f83abbf
|
@ -67,6 +67,7 @@ const (
|
||||||
TypeMOV MediaType = "video/quicktime"
|
TypeMOV MediaType = "video/quicktime"
|
||||||
TypeTS MediaType = "video/mp2t"
|
TypeTS MediaType = "video/mp2t"
|
||||||
TypeMTS MediaType = "video/MP2T"
|
TypeMTS MediaType = "video/MP2T"
|
||||||
|
TypeMKV MediaType = "video/x-matroska"
|
||||||
)
|
)
|
||||||
|
|
||||||
var SupportedMimetypes = [...]MediaType{
|
var SupportedMimetypes = [...]MediaType{
|
||||||
|
@ -130,6 +131,7 @@ var VideoMimetypes = [...]MediaType{
|
||||||
TypeMOV,
|
TypeMOV,
|
||||||
TypeTS,
|
TypeTS,
|
||||||
TypeMTS,
|
TypeMTS,
|
||||||
|
TypeMKV,
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebVideoMimetypes are video types that can be played directly in the browser without transcoding
|
// WebVideoMimetypes are video types that can be played directly in the browser without transcoding
|
||||||
|
@ -196,6 +198,7 @@ var fileExtensions = map[string]MediaType{
|
||||||
".ts": TypeTS,
|
".ts": TypeTS,
|
||||||
".m2ts": TypeMTS,
|
".m2ts": TypeMTS,
|
||||||
".mts": TypeMTS,
|
".mts": TypeMTS,
|
||||||
|
".mkv": TypeMKV,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (imgType *MediaType) IsRaw() bool {
|
func (imgType *MediaType) IsRaw() bool {
|
||||||
|
|
Loading…
Reference in New Issue