mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-26 05:19:15 -08:00
implement fallback (#104)
This commit is contained in:
parent
bbc2401ac2
commit
655e0d0fd6
4 changed files with 60 additions and 0 deletions
|
|
@ -612,6 +612,13 @@ func (pa *Path) onClientDescribe(c *client.Client) {
|
|||
return
|
||||
|
||||
case sourceStateNotReady:
|
||||
if pa.conf.Fallback != "" {
|
||||
pa.addClient(c, clientStatePreRemove)
|
||||
pa.removeClient(c)
|
||||
c.OnPathDescribeData(nil, pa.conf.Fallback, nil)
|
||||
return
|
||||
}
|
||||
|
||||
pa.addClient(c, clientStatePreRemove)
|
||||
pa.removeClient(c)
|
||||
c.OnPathDescribeData(nil, "", fmt.Errorf("no one is publishing to path '%s'", pa.name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue