janode icon indicating copy to clipboard operation
janode copied to clipboard

Joining audiobridge is locked to opus codec only

Open pawnnail opened this issue 1 year ago • 0 comments

Have come across a problem where joining as a plain rtp with a codec other that opus is impossible. Being irrelevant whether a participant is plain rtp or not, it seems join() is missing the 'codec' param. In my case, I was trying to join as a plain rtp participant with pcmu or pcma.

The fix is trivial, just adding the codec param to the join method (and documentation) does the trick. Something like that:

async join({ room, ..., generate_offer, codec }) {
  const body = {
      request: REQUEST_JOIN,
      room,
    };
...
...
    if (typeof codec === 'string') body.codec = codec;
    if (typeof muted === 'boolean') body.muted = muted;
...
}

I hope I am not missing anything.

pawnnail avatar May 10 '24 05:05 pawnnail