mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
Add support for ingress ParticipantMetadata (#2461)
This commit is contained in:
2
go.mod
2
go.mod
@@ -19,7 +19,7 @@ require (
|
||||
github.com/jxskiss/base62 v1.1.0
|
||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240206082112-9bf41dcbce76
|
||||
github.com/livekit/protocol v1.9.9-0.20240206170043-39eb9f38a0a6
|
||||
github.com/livekit/protocol v1.9.9-0.20240207222207-9c3dabb016f6
|
||||
github.com/livekit/psrpc v0.5.3-0.20240129223932-473b29cda289
|
||||
github.com/mackerelio/go-osstat v0.2.4
|
||||
github.com/magefile/mage v1.15.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -128,8 +128,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
|
||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240206082112-9bf41dcbce76 h1:Zw88krOHni51OzDUlrduYb3m7VcsaKw06TnnDhsQpjg=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240206082112-9bf41dcbce76/go.mod h1:GBzn9xL+mivI1pW+tyExcKgbc0VOc29I9yJsNcAVaAc=
|
||||
github.com/livekit/protocol v1.9.9-0.20240206170043-39eb9f38a0a6 h1:85NwqH78bbR1r9XG7jOPfUj/VlcvoMF7tXQqh3fkgUk=
|
||||
github.com/livekit/protocol v1.9.9-0.20240206170043-39eb9f38a0a6/go.mod h1:lSJlMeTJfQBEv8/D2p3zdCo+i+jTmTtn24ysL4ePK28=
|
||||
github.com/livekit/protocol v1.9.9-0.20240207222207-9c3dabb016f6 h1:hYsKwQCb3Q89flJAz8r74bcGOWH+3EGaCXBMFNtlQpU=
|
||||
github.com/livekit/protocol v1.9.9-0.20240207222207-9c3dabb016f6/go.mod h1:lSJlMeTJfQBEv8/D2p3zdCo+i+jTmTtn24ysL4ePK28=
|
||||
github.com/livekit/psrpc v0.5.3-0.20240129223932-473b29cda289 h1:oTgNH7v9TXsBgoltKk5mnWjv4qqcPF2iV+WtEVQ6ROM=
|
||||
github.com/livekit/psrpc v0.5.3-0.20240129223932-473b29cda289/go.mod h1:cQjxg1oCxYHhxxv6KJH1gSvdtCHQoRZCHgPdm5N8v2g=
|
||||
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
||||
|
||||
@@ -33,8 +33,10 @@ import (
|
||||
"github.com/livekit/protocol/rpc"
|
||||
)
|
||||
|
||||
type CongestionControlProbeMode string
|
||||
type StreamTrackerType string
|
||||
type (
|
||||
CongestionControlProbeMode string
|
||||
StreamTrackerType string
|
||||
)
|
||||
|
||||
const (
|
||||
generatedCLIFlagUsage = "generated"
|
||||
@@ -294,8 +296,7 @@ type IngressConfig struct {
|
||||
WHIPBaseURL string `yaml:"whip_base_url,omitempty"`
|
||||
}
|
||||
|
||||
type SIPConfig struct {
|
||||
}
|
||||
type SIPConfig struct{}
|
||||
|
||||
type APIConfig struct {
|
||||
// amount of time to wait for API to execute, default 2s
|
||||
@@ -639,10 +640,10 @@ func (conf *Config) ToCLIFlagNames(existingFlags []cli.Flag) map[string]reflect.
|
||||
func (conf *Config) ValidateKeys() error {
|
||||
// prefer keyfile if set
|
||||
if conf.KeyFile != "" {
|
||||
var otherFilter os.FileMode = 0007
|
||||
var otherFilter os.FileMode = 0o007
|
||||
if st, err := os.Stat(conf.KeyFile); err != nil {
|
||||
return err
|
||||
} else if st.Mode().Perm()&otherFilter != 0000 {
|
||||
} else if st.Mode().Perm()&otherFilter != 0o000 {
|
||||
return ErrKeyFileIncorrectPermission
|
||||
}
|
||||
f, err := os.Open(conf.KeyFile)
|
||||
@@ -747,6 +748,9 @@ func GenerateCLIFlags(existingFlags []cli.Flag, hidden bool) ([]cli.Flag, error)
|
||||
case reflect.Map:
|
||||
// TODO
|
||||
continue
|
||||
case reflect.Struct:
|
||||
// TODO
|
||||
continue
|
||||
default:
|
||||
return flags, fmt.Errorf("cli flag generation unsupported for config type: %s is a %s", name, kind.String())
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string
|
||||
RoomName: req.RoomName,
|
||||
ParticipantIdentity: req.ParticipantIdentity,
|
||||
ParticipantName: req.ParticipantName,
|
||||
ParticipantMetadata: req.ParticipantMetadata,
|
||||
State: &livekit.IngressState{},
|
||||
}
|
||||
|
||||
@@ -224,6 +225,9 @@ func updateInfoUsingRequest(req *livekit.UpdateIngressRequest, info *livekit.Ing
|
||||
if req.BypassTranscoding != nil {
|
||||
info.BypassTranscoding = *req.BypassTranscoding
|
||||
}
|
||||
if req.ParticipantMetadata != "" {
|
||||
info.ParticipantMetadata = req.ParticipantMetadata
|
||||
}
|
||||
if req.Audio != nil {
|
||||
info.Audio = req.Audio
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user