Closed ashkalor closed 1 year ago
have you set data: true
when either configuring or publishing the participant?
Yes, I have done that.
const roomResponse = await videoHandle.joinSubscriber({
room: process.env.JANUS_ROOM,
feed: process.env.JANUS_DEVICE_ID + "-data",
audio: false,
video: true,
data: true,
restart: true,
});
The only error i do get is in media server, where it says the feed api is deprecated.
I found a work around through which if I manually create the data channel with the same label as incoming data( i.e the feed id ). I am able to receive the data. However when the publisher stops publishing, disconnects or reconnects to Janus server. The subscriber has no way of knowing that the data has stopped. The onclose events on data channel do not fire and the subscribers don't get notification using the videoroom plugin events.
I meant on the publishing side.
BTW datachannels happen on the negotiation (SDP) and janode only acts on the signalling plane (the data: true
flag), I don't see how the library could interfere with the data channels setup.
Hey , The publisher is sending data, when I create a subscriber using janus.js. I am able to receive the data.
I understand that this library only acts on the signaling plane and maybe isn't affecting the issue at all however since janode is the best fit for usage in node applications. Its integration with Janus.js client on the web will be really beneficial which is also why I put up this question in the general category of the discourse group.
In an ideal scenario, when two peers connect we are able to directly access the data channel, catch the close events etc, but since this is going through janus. I am not sure if I am doing something wrong which is causing the peer connection to not catch the data channel events.
Any help to debug this will be greatly appreciated.
Closing since I plan to move the discussion to the discourse group.
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
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.