Fix publish-only limitations being incorrectly applied to receivers (#4495)
* Fix publish-only limitations being incorrectly applied receive-side in a single PC * `StaticConfigurations` disabled some codecs for publish only, which worked in dual PC * In single PC, the server incorrectly disabled these codecs in both directions * Dual PC mode is unchanged; single PC handles per-direction filtering correctly * Filter recv-side codecs to publish list in single-PC SDP answer * Confirm H264 is present in offer in test
This commit is contained in:
@@ -304,7 +304,8 @@ func (c *RTCClient) createTransport(rtcconf webrtc.Configuration) error {
|
||||
c.publisher, err = rtc.NewPCTransport(rtc.TransportParams{
|
||||
Config: &conf,
|
||||
DirectionConfig: conf.Subscriber,
|
||||
EnabledCodecs: c.enabledCodecs,
|
||||
EnabledPublishCodecs: c.enabledCodecs,
|
||||
EnabledSubscribeCodecs: c.enabledCodecs,
|
||||
IsOfferer: true,
|
||||
IsSendSide: true,
|
||||
Handler: publisherHandler,
|
||||
@@ -389,7 +390,8 @@ func (c *RTCClient) createTransport(rtcconf webrtc.Configuration) error {
|
||||
c.subscriber, err = rtc.NewPCTransport(rtc.TransportParams{
|
||||
Config: &conf,
|
||||
DirectionConfig: conf.Publisher,
|
||||
EnabledCodecs: c.enabledCodecs,
|
||||
EnabledPublishCodecs: c.enabledCodecs,
|
||||
EnabledSubscribeCodecs: c.enabledCodecs,
|
||||
Handler: subscriberHandler,
|
||||
DatachannelMaxReceiverBufferSize: 1500,
|
||||
DatachannelSlowThreshold: 1024 * 1024 * 1024,
|
||||
|
||||
Reference in New Issue
Block a user