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:
olafal0
2026-04-30 18:49:34 +05:30
committed by GitHub
parent a002337db1
commit f51798bcf6
5 changed files with 213 additions and 7 deletions
+4 -2
View File
@@ -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,