How to retrieve the parameter "stream_id" of stop_rtp_forward request in VideoRoom plugin?

202 views
Skip to first unread message

劉良謙

unread,
Jul 15, 2016, 5:50:28 AM7/15/16
to meetecho-janus
Hi there, 

I'm using the rtp-forward feature to forward webrtc audio to my local receiver like gstreamer, ffmepg, etc.

What I want to know is how do I get the "stream_id" parameter of the "stop_rtp_forward" request.

In my understanding, the parameter is supposed to be in the response message of "rtp_forward" request.

I did get the response of the "rtp_forward" request, which contains the "stream_id" under "rtp_stream" object, but it seems the response data is receive by janus.js rather than videoroomtest.js.

Is there any way I can retrieve "stream_id" either modifying the codes of front-end or back-end?

Thanks in advance.

Joshua


Амнон Исраэли

unread,
Jul 15, 2016, 7:32:48 AM7/15/16
to meetecho-janus

劉良謙

unread,
Jul 17, 2016, 11:05:43 PM7/17/16
to meetecho-janus
Thanks for the reply :)

I looked into the link and found it that the listforwarders request also exists the issue I'm concern about, which is 

the response text is obtained by the "janus.js" rather than "videoroom.js".

I have started to write javascript for only a few months so not quite sure how to make the message handler inside a plugin (videoroom.js) get the message handled by the other script (janus.js).

Any help or advice will be great!

Regards
Joshua

On Friday, 15 July 2016 19:32:48 UTC+8, Амнон Исраэли wrote:

Lorenzo Miniero

unread,
Jul 18, 2016, 2:16:07 AM7/18/16
to meetecho-janus
listforwarders is a synchronous request, which means you have to add a response callback to the send request, something you're probably not doing. You can find an example here, where we do a synchronous "list" request to the streaming plugin:


L.

劉良謙

unread,
Jul 18, 2016, 3:08:12 AM7/18/16
to meetecho-janus
Thanks for the great help and example!

Now it's working!

Thank you all!.

Joshua
Reply all
Reply to author
Forward
0 new messages