mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-22 22:56:52 +00:00
remove os check
This commit is contained in:
parent
3617e544c9
commit
7f90724336
@ -14,7 +14,7 @@ Features:
|
||||
* Each stream can have multiple video and audio tracks
|
||||
* Supports the RTP/RTCP streaming protocol
|
||||
* Optional authentication mechanism for publishers
|
||||
* Optionally run a script on client connect or disconnect (currently Linux only)
|
||||
* Run a script when a client connects or disconnects
|
||||
* Compatible with Linux and Windows, does not require any dependency or interpreter, it's a single executable
|
||||
|
||||
## Installation
|
||||
|
17
main.go
17
main.go
@ -6,7 +6,6 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@ -109,22 +108,6 @@ func newProgram(protocolsStr string, rtspPort int, rtpPort int, rtcpPort int, pu
|
||||
}
|
||||
}
|
||||
|
||||
if preScript != "" {
|
||||
if runtime.GOOS != "linux" {
|
||||
return nil, fmt.Errorf("connect script currenty supported only on Linux")
|
||||
} else if !regexp.MustCompile(`(?m)^(.+)\/([^/]+)$`).MatchString(preScript) {
|
||||
return nil, fmt.Errorf("connect script must be a valid path")
|
||||
}
|
||||
}
|
||||
|
||||
if postScript != "" {
|
||||
if runtime.GOOS != "linux" {
|
||||
return nil, fmt.Errorf("disconnect script currently supported only on Linux")
|
||||
} else if !regexp.MustCompile(`(?m)^(.+)\/([^/]+)$`).MatchString(postScript) {
|
||||
return nil, fmt.Errorf("disconnect script must be a valid path")
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("rtsp-simple-server %s", Version)
|
||||
|
||||
p := &program{
|
||||
|
Loading…
Reference in New Issue
Block a user