UnsupportedError: cannot consume this Producer

I am trying to create a consumer in the client-side, but getting an Unsupported Error which says that it cannot consume this Producer.

I looked at the source code, and the problem is that remotePayloadType of extendedRtpCapabilities.codecs is undefined while firstMediaCodec.payloadType is not

Do you have any ideas to solve the problem?

Let’s not consider this a problem yet.

  • Which mediaCodecs are you providing the mediasoup Router with? Please print them.
  • Which routerRtpCapabilities are you providing mediasoup-client device.load() with? Please print them.

I am only using audio, so I am providing only one mediaCodec to the mediasoup Router

routerOptions :
		{
			mediaCodecs :
			[
				{
					kind      : 'audio',
					mimeType  : 'audio/opus',
					clockRate : 48000,
					channels  : 2,
				},
				
			]
		},

And below is the routerRtpCapabilities

I will need much more detailed info, such as your device._extendedRtpCapabilities and all the parameters you are calling transport.consume() with in client side.

Thank you for your help ibc. the problem was that I was getting wrong extendedRtpCapabilities. instead of returning rtpCapabilities or the router, I was using getSupportedRtpCapabilities method, whicn gave me a problem. Your question was extremely helpful in solving the problem.

1 Like

Great. Not the first time I see the very same problem so we’ll try to document it better.

Hope it’s more clear now:

this is great! thank you for doing that. but do you know why router.rtpCapabilities could be different from the return value of router.getSupportedRtpCapabilities() ?

Because they are not the same at all. The former returns all the capabilities of mediasoup while the latter returns the computed ones in each Router based on given mediaCodecs.

1 Like