Open threema-lenny opened 7 months ago
@threema-lenny, how are you taking benefit of choosing the steam ID for a DataConsumer? Can you share a use case?
@threema-lenny, how are you taking benefit of choosing the steam ID for a DataConsumer? Can you share a use case?
Sure.
We're using OOB negotiated data channel IDs (using pc.createDataChannel('foo', {negotiated: true, id: 0})
). This simplifies client code by making it possible to have a single bidirectional RTCDataChannel
at creation of the peer connection without having to listen to an ondatachannel
event and having to map data channels there (although I'm not even sure if the mediasoup SFU implements the data channel establishment protocol, haven't checked) nor is it necessary to signal it in another way because the ID is already known beforehand.
In our case, data is relayed via the SFU using this fixed SCTP stream ID which is why we set the corresponding SCTP stream ID for both producer and consumer.
I get the point of this feature but need some time to review it.
@threema-lenny are you working on this PR?
@ibc Not right now but I'll definitely need to come back to getting this done.
Second try (after #1111). This makes it possible to use a specific SCTP stream ID / data channel ID for forwarding data.
Could you give me feedback on whether this looks good for the Node API? Then I'll see if I can add the change to the Rust API, too.
TODO
sctpStreamId
inDataConsumerOptions
in the website. This task is for mediasoup authors once this PR is merged.