Question about mediasoup-client and mediasoup-rust on DataChannel

Environments:

  • mediasoup-client: latest
  • mediasoup-rust: latest

Questions:

  • The mediasoup-client requires loading device.load({routerRtpCapabilities}); before establishing an SCTP connection (for DataChannel), but DataChannel doesn’t use rtp, so why still requires that step?

  • The mediasoup-rust doesn’t have a corresponding SCTPCapacities data structure as mediasoup-client does, what’s more, mediasoup-rust can still establish connection only with sctp_parameters exchanged. I think it’s a little inconsistent.

It creates both local rtpCapabilities and sctpCapabilities. As both members of the router RtpCapabilities are optional, device.load accepts an empty object as argument.

No, it’s not. See: mediasoup-client/RtpParameters.ts at 92d0c16ac71c3224e646ef9bb609c3e35e0a7b5f · versatica/mediasoup-client · GitHub

This only relates to MediaKind.

I don’t see what that line proves, it is just an interface for an optional parameter, Sergey is absolutely correct here. Do you have problems with calling a method or what?

The mediasoup-rust doesn’t have a corresponding SCTPCapacities data structure as mediasoup-client does, what’s more, mediasoup-rust can still establish connection only with sctp_parameters exchanged. I think it’s a little inconsistent.

Not sure what exactly is inconsistent, what is the problem here?

I don’t know much about Typescript, but my editor linter shows an error when device.load inputs an empty object as argument.

And what’s more, as mentioned above, mediasoup-rust doesn’t have a corresponding SCTPCapacities data structure as mediasoup-client does, that means SCTPCapacities can be exchanged between mediasoup and client. Right?

I don’t see what that line proves, it is just an interface for an optional parameter

Sorry, TypeScript grammer problem resolved.

I don’t see anything called SCTPCapacities neither in mediasoup-client nor in its documentation, so not sure what and where you want to exchange.

It’s device.sctpCapabilities. See also,this example: GitHub - versatica/mediasoup-client: mediasoup client side JavaScript library

And what is wrong with that in Rust? It is a custom signaling logic given to you as an abstract example. Mediasoup itself doesn’t provide any kind of signaling whatsoever, it is up to you to decide how you want to do it.

Yes, I know. I just think that mediasoup-client provides device.sctpCapabilities which could be useful in signaling perhaps, but current mediasoup-rust doesn’t include such data structure and nowhere to accept it either. So that makes device.sctpCapabilities useless.

Where do you see SctpCaoabilities in mediasoup server Node?

Sorry, I never used mediasoup server Node. If Node implementation doesn’t include SctpCaoabilities either, then I must correct a mistake made above saying it’s inconsistent. But that also really makes device.sctpCapabilities confussing in usage.