mirror of
https://github.com/Monibuca/plugin-record.git
synced 2025-12-24 13:07:51 +08:00
适配引擎升级
This commit is contained in:
3
go.mod
3
go.mod
@@ -5,12 +5,11 @@ go 1.19
|
||||
require (
|
||||
github.com/edgeware/mp4ff v0.28.0
|
||||
go.uber.org/zap v1.23.0
|
||||
m7s.live/engine/v4 v4.11.18
|
||||
m7s.live/engine/v4 v4.12.0
|
||||
m7s.live/plugin/hls/v4 v4.0.0-20220619163635-447976e65ab9
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/aler9/gortsplib v1.0.1 // indirect
|
||||
github.com/aler9/gortsplib/v2 v2.2.2 // indirect
|
||||
github.com/cnotch/ipchub v1.1.0 // indirect
|
||||
github.com/denisbrodbeck/machineid v1.0.1 // indirect
|
||||
|
||||
6
go.sum
6
go.sum
@@ -1,6 +1,4 @@
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/aler9/gortsplib v1.0.1 h1:R13+hxlvg2Hvu98+0hzg0o5fPjyUA9ZPJneMIBxKGXk=
|
||||
github.com/aler9/gortsplib v1.0.1/go.mod h1:BOWNZ/QBkY/eVcRqUzJbPFEsRJshwxaxBT01K260Jeo=
|
||||
github.com/aler9/gortsplib/v2 v2.2.2 h1:tTw8pdKSOEjlZjjE1S4ftXPHJkYOqjNNv3hjQ0Nto9M=
|
||||
github.com/aler9/gortsplib/v2 v2.2.2/go.mod h1:k6uBVHGwsIc/0L5SLLqWwi6bSJUb4VR0HfvncyHlKQI=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
@@ -283,7 +281,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
m7s.live/engine/v4 v4.11.18 h1:tgINiHqrrLdWEnoFZ0n2gSwoQwPwBgz+V/NXgo5K4Ks=
|
||||
m7s.live/engine/v4 v4.11.18/go.mod h1:YoOThdhOpkf7MUDWciy449vfBF7i1p+dtf5o32hOvXY=
|
||||
m7s.live/engine/v4 v4.12.0 h1:CRPbJ0jhHVZArc5mvV7e6Seb4Ye816kGzs3FOVKnfHw=
|
||||
m7s.live/engine/v4 v4.12.0/go.mod h1:AiJPBwdA77DM3fymlcH2qYPR8ivL6ib9UVLm1Rft/to=
|
||||
m7s.live/plugin/hls/v4 v4.0.0-20220619163635-447976e65ab9 h1:EcB8awppfwza+s4ECjUr3xLTtl9BgJcZ12EgfE/L2YA=
|
||||
m7s.live/plugin/hls/v4 v4.0.0-20220619163635-447976e65ab9/go.mod h1:Qn4dDz5xlyBJwO+eZ3w8CUQ8Hl6KN1nmv0a3IsOjJvw=
|
||||
|
||||
6
vod.go
6
vod.go
@@ -2,7 +2,6 @@ package record
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func ext(path string) string {
|
||||
@@ -15,10 +14,7 @@ func ext(path string) string {
|
||||
}
|
||||
|
||||
func (conf *RecordConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
p := strings.TrimPrefix(r.RequestURI, "/")
|
||||
p = strings.TrimPrefix(p, "record/")
|
||||
r.URL.Path = p
|
||||
switch ext(p) {
|
||||
switch ext(r.URL.Path) {
|
||||
case ".flv":
|
||||
conf.Flv.ServeHTTP(w, r)
|
||||
case ".mp4":
|
||||
|
||||
Reference in New Issue
Block a user