Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

RtpSender.send() must enforce stricter rules #564

Description

@ibc

RtpSender.send():

7- For each value of i from 0 to the number of codecs, check that each value of withParameters.codecs[i].name not equal to "red", "rtx" or a forward error correction codec is included in getCapabilities(track.kind).codecs[j].name, where j goes from 0 to the number of codecs. If a match is not found for any value of i, return a promise rejected with InvalidParameters.

That is a too much simplistic check. The fact that the codec name matches one in getCapabilities() does not mean, at all, that it is the "same" codec. Lot of scenarios here:

  • What would happen if send() is called with an "audio/opus" codec that includes rtcpFeedback entries not present in the "audio/opus" codec of the local capabilities?
  • Or what would happen if clockRate does not match?
  • Or imagine that local "video/H264" supports packetization-mode 0 and 1, but send() is called with codec.parameters.packetizationMode: 2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions