simplify Path.HasStaticSource() (#3876)
This commit is contained in:
parent
cf9484a96e
commit
a532779e33
|
@ -578,17 +578,7 @@ func (pconf *Path) Equal(other *Path) bool {
|
||||||
|
|
||||||
// HasStaticSource checks whether the path has a static source.
|
// HasStaticSource checks whether the path has a static source.
|
||||||
func (pconf Path) HasStaticSource() bool {
|
func (pconf Path) HasStaticSource() bool {
|
||||||
return strings.HasPrefix(pconf.Source, "rtsp://") ||
|
return pconf.Source != "publisher" && pconf.Source != "redirect"
|
||||||
strings.HasPrefix(pconf.Source, "rtsps://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "rtmp://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "rtmps://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "http://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "https://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "udp://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "srt://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "whep://") ||
|
|
||||||
strings.HasPrefix(pconf.Source, "wheps://") ||
|
|
||||||
pconf.Source == "rpiCamera"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasOnDemandStaticSource checks whether the path has a on demand static source.
|
// HasOnDemandStaticSource checks whether the path has a on demand static source.
|
||||||
|
|
Loading…
Reference in New Issue