Feature: codec restrictions.

In order to ensure clients are publishing with compatible codecs, the server can enforce codec restrictions.
This commit is contained in:
David Zhao
2021-07-02 16:54:54 -07:00
parent af310df233
commit 6751361187
12 changed files with 179 additions and 41 deletions
+5 -3
View File
@@ -38,6 +38,7 @@ type ParticipantParams struct {
ProtocolVersion types.ProtocolVersion
Stats *RoomStatsReporter
ThrottleConfig config.PLIThrottleConfig
EnabledCodecs []*livekit.Codec
}
type ParticipantImpl struct {
@@ -102,9 +103,10 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
var err error
p.publisher, err = NewPCTransport(TransportParams{
Target: livekit.SignalTarget_PUBLISHER,
Config: params.Config,
Stats: p.params.Stats,
Target: livekit.SignalTarget_PUBLISHER,
Config: params.Config,
Stats: p.params.Stats,
EnabledCodecs: p.params.EnabledCodecs,
})
if err != nil {
return nil, err