Establishment of a data channel

Hi,

I am trying to establish a data channel connection in the streaming plugin between Janus and a web application.
My recently added code to the streaming plugin can now receive streams that are not RTP, decode them, and encode them into RTP packets. This all works great.
Now, I want to add the option to transfer metadata, that is extracted from the incoming stream, parsed, and converted to JSON format, using data channels.
I’m a bit confused about how to do so, does this require me to change the streaming configuration, open a data channel connection or is there a simpler solution?
I saw that data channels are referred to by ‘stream->buffermsg’ in the code, is that correct?

I’m quite new in this field so I would appreciate any help. Thanks :slight_smile:

I can’t help on custom code, but the Streaming plugin supports plain relaying of data channel messages. Check where the relay_data() function is called for examples.

1 Like

Hi Lorenzo,

That indeed helped, thanks!
I’m still unable to understand where exactly in the code Janus establishes its data channel connection and what it relays on to create the connection. Can you refer me to that location in the code?

Thanks