Update WebRTC type in info JSON

This commit is contained in:
Alexey Khit
2023-03-08 17:33:00 +03:00
parent 775b1818d1
commit 1fc2cf3175
9 changed files with 67 additions and 14 deletions
+23
View File
@@ -5,6 +5,29 @@ import (
"time"
)
type Mode byte
const (
ModeActiveProducer Mode = iota + 1 // typical source (client)
ModePassiveConsumer
ModePassiveProducer
ModeActiveConsumer
)
func (m Mode) String() string {
switch m {
case ModeActiveProducer:
return "active producer"
case ModePassiveConsumer:
return "passive consumer"
case ModePassiveProducer:
return "passive producer"
case ModeActiveConsumer:
return "active consumer"
}
return "unknown"
}
type Info struct {
Type string `json:"type,omitempty"`
URL string `json:"url,omitempty"`