Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The name of the datachannel is always JanusDataChannel #2566

Closed
Harkanork opened this issue Feb 22, 2021 · 4 comments
Closed

The name of the datachannel is always JanusDataChannel #2566

Harkanork opened this issue Feb 22, 2021 · 4 comments

Comments

@Harkanork
Copy link

Hi,

Version: Janus v0.11.1

If a publisher creates a data channel with a custom name ('ChatChannel' for example), the OnDataChannel of the subscriber always receives a datachannel withe the name 'JanusDataChannel'.

Expected : The datachannel created on the subscriber side has the good name

Janus Logs:
Janus receives the creation of the datachannel by the publisher
[Mon Feb 22 18:41:26 2021] [4279064680722971] Opened channel 'ChatChannel' (protocol=??, id=1) (0/0/0)

Janus receives a message and send the creation to the subscriber
[Mon Feb 22 18:41:42 2021] [4279064680722971] Incoming SCTP contents: {"author":"Inscape","epoch":1614015702,"message":"super"}
[Mon Feb 22 18:41:42 2021] Got a text DataChannel message (57 bytes) to forward
[Mon Feb 22 18:41:42 2021] Forwarding text DataChannel message (57 bytes) to viewer
[Mon Feb 22 18:41:42 2021] [3366957378648267] SCTP data to send (label=JanusDataChannel, 57 bytes) coming from a plugin.
[Mon Feb 22 18:41:42 2021] [3366957378648267] Outgoing SCTP contents: {"author":"Inscape","epoch":1614015702,"message":"super"}
[Mon Feb 22 18:41:42 2021] [3366957378648267] Creating channel 'JanusDataChannel'...
[Mon Feb 22 18:41:42 2021] Opening channel with label 'JanusDataChannel' (16, protocol )

@lminiero
Copy link
Member

Yes, that's normal in the regular demo and with janus.js, because the VideoRoom plugin doesn't use labels when sending data to participants, and re-uses the ones subscribers create themselves (and janus.js uses that name for the default DC). This is not a problem as each PeerConnection can only serve content from a specific publisher, so no matter the label, if data is coming from PC X, you know who it's from. The multistream branch VideoRoom instead uses the publisher ID as the label.

Closing as it's working as intended.

@Harkanork
Copy link
Author

Ok, as you want but if I understand the current version of Janus can not manage more than 1 datachannel per publisher, right?
In the multistream branch, why do you force the label of the datachannel instead of using the one given by the publisher?

@lminiero
Copy link
Member

the current version of Janus can not manage more than 1 datachannel per publisher

You're confusing Janus and VideoRoom: they're not the same thing. The VideoRoom plugin only does 1 data channel, yes; Janus doesn't have this limit. If you play with the Lua or Duktape plugin to write your own script, for instance, you'll find you have more flexibility there, using different labels to send and receive traffic.

In the multistream branch, why do you force the label of the datachannel instead of using the one given by the publisher?

Because in multistream you can subscribe to more than one participant on the same PeerConnection. Using the participant ID as the label allows the subscriber to know who the data they're receiving comes from (since you may receive multiple data messages on the same PC).

@mircokam
Copy link

Hello,
we testet the Android App Talk Version 18.1.0 on Pixel 7 with Janus 1.x Multistream an Nextcloud 28.0.3 and Talk 18.0.5 and nextcloud-spreed-signaling 1.2.3 an it works now with video. :-)

sunweaver/nextcloud-high-performance-backend-setup#109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants