Hi everyone, i have searched the page for similar questions but it seems there is none. My team is moving away from using the deprecated (feed, video, offer_video) options when subscribing to a room to using the new streams option (see below) . We are using janode but it seems the janode doesn’t support the streams option. How do i use the streams option for subscribe in Janode? Thanks.
{
“request” : “join”,
“ptype” : “subscriber”,
“room” : ,
“use_msid” : <whether subscriptions should include an msid that references the publisher; false by default>,
“autoupdate” : <whether a new SDP offer is sent automatically when a subscribed publisher leaves; true by default>,
“private_id” : <unique ID of the publisher that originated this request; optional, unless mandated by the room configuration>,
“streams” : [
{
“feed” : ,
“mid” : “<unique mid of the publisher stream to subscribe to; optional>”
“crossrefid” : “<id to map this subscription with entries in streams list; optional>”
// Optionally, simulcast or SVC targets (defaults if missing)
},
// Other streams to subscribe to
]
}
@atoppi Wow. Thats a lot of work you did there with the patch. i focused on the request sent and updated some parts of the code to include streams but it seems you did a lot of work updating the entire code to include streams. Thanks so much. I am wondering why you didnt create a separate ‘update’ socket in the index.js for subscribe and unsubscribe when using ‘streams’? I will test the demo and give my feedback too.
@atoppi. Whats your opinion on this? i realised that in the the janode middleware, subscribe and unsubscribe are both using the update request. However they are called in separate functions. What do you think about calling them in the same function while using update request. By this way, the request to the server can be reduced.
Instead of subscribe({streams}) and unsubscribe({streams})
What about, update(subscribe:{streams}, unsubscribe:{streams}) ??? Are there some bottlenecks?
That’s not a matter of janode, but a feature of the Janus VideoRoom API. The update API is meant to be used exactly for that: do subscriptions and unsubscriptions through a single request, hence reducing the number of messages. There is no downside in using update.
@atoppi Thanks for the reply. In the new videoroom-ms branch, do you intend to make changes to the index.js code to use both subscribe and unsubscribe in a single request anytime soon?
I don’t think so, since there is no use case for that in the very basic example the code provides.
However implementing a full update request in your application should be trivial.