Publisher with only data channel not announced in video room plugin

Hi,

It seems like when using the video room plugin and having a publisher which only publishes a data channel, that publisher does not get announced, so no-one can subscribe.

The code to reproduce this is roughly:

janusSession.attach({
  plugin: "janus.plugin.videoroom",
  success: (handle) => {
    handle.send({
      message: {
        request: "join",
        ptype: "publisher",
        room: roomID,
        pin: roomPIN,
      },
    })

    handle.createOffer({
      tracks: [{ type: "data" }],
      error: (error: any) => console.log("WebRTC error: ", error),
      success: (jsep: T.VideoRoomJSEP) => {
        handle.send({
          message: {
            request: "publish",
          },
          jsep: jsep,
        });
      },
    })
  },
  error: (_) => {console.log("An error happened")},
  onmessage: (msg: any) => {console.log("received msg", msg)},
})

Is this expected behavior?

Note that I am using the janus.js library, not Janode, but could migrate if that fixes my problem.

The bigger picture is that on one side I have one publisher with 2 video streams + a data channel and on the other side a bunch of publishers with only a data channel. All publishers from one side should be able to connect as subscribers to the streams/data-channels from the other side.

Using multiple plugins to achieve this setup is probably a bit of a pain (and I see that Janode currently doesn’t support the text room plugin).

The VideoRoom will notify all publishers with a PeerConnection, no matter what it’s for. If that’s not happening for data-only publishers, it’s a bug.

Ok, thanks for the quick reply!

After some more investigating, the problem turned out to be with the javascript code…

I was missing the handle.handleRemoteJsep({ jsep: jsep }) in onmessage.