How to access data channels in janode when using the videoroom plugin

Hey all,
I have a publisher that is using Janus.js as a client for publishing data in a videoroom. Using janode I can setup the peer connection, access the mediastream track , etc . However I am not able to access anything related to the data coming from the publisher.
I looked through janode examples and found nothing on data channels.
It ll be really great help if someone can point me in the right direction for going about this.

P.S I have already tried to listen to data channel events shown below like

peerConnection.ondatachannel = (event) => {
  const dataChannel = event.channel;

  dataChannel.onopen = () => {
    console.log('Data channel opened');
  };

  dataChannel.onmessage = (event) => {
    console.log('Received message:', event.data);
  };

  dataChannel.onclose = () => {
    console.log('Data channel closed');
  };
};

But this doesn’t seem to work.
I can confirm that data is being sent from the publisher based on console and media server logs.

please don’t cross post the same request, we have already replied on github

You have to mimic in your RTC stack (using janode) what janus.js does.
It might sound a bit tricky but you should create a datachannel on the peer side with the default Janus label and also be ready to accept the callback “ondatachannel”.

Check how createDataChannel is used here and also what operations it performs.