Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST endpoints documentation #1

Closed
DamonOehlman opened this issue Feb 12, 2014 · 8 comments
Closed

REST endpoints documentation #1

DamonOehlman opened this issue Feb 12, 2014 · 8 comments

Comments

@DamonOehlman
Copy link
Contributor

First - thanks for releasing this. Of all the WebRTC gateways that have been released this is the most exciting so far IMO (modular architecture, lightweight implementation, etc). At least from my early look...

I was just wondering whether there was anywhere that the actual REST endpoints for the /janus services are documented. While I think having the JS library is a good idea, I'm pretty keen to drive janus from node so will be manually triggering a lot of stuff there.

If the documentation doesn't exist already, I'm probably going to be compiling some of this information from monitoring network traffic and looking through the source so if you would like me to include this in the wiki or something then I'd be more than happy to do that.

Cheers,
Damon.

@meetecho
Copy link
Collaborator

Hi Damon,

this is Lorenzo, we met in San Francisco for FOMS in November, nice to see you see potential in this project! A REST documentation is definitely a good suggestion, we'll start preparing one right away.

Just to give you an idea of how it works (I'll add details in the documentation itself), the endpoints you refer to are basically 3:

  1. the gateway root (/janus by default, but configurable), which you only POST to in order to create a gateway session;
  2. a gateway session endpoint (e.g., /janus/12345678, using the identifier retrieved with the previous create), which you either send a GET to (long poll for events and messages from plugins) or a POST (to create plugin handles or manipulate the session);
  3. a plugin handle endpoint (e.g., /janus/12345678/98765432, appending the handle identifier to the session one) which you only send POST messages to (messages/negotiations for a plugin, handle manipulation), as all events related to this handle would be received in the session endpoint GET (our library then redirects the incoming messages to the right handle internally).

The messages that flow around are JSON-based, and have a simple syntax for creating/destroying sessions and handles, and for describing messages and negotiation.

I'll provide more details in the next commit, but feel free to ask for more clarifications in the meanwhile if needed.

Lorenzo

@DamonOehlman
Copy link
Contributor Author

Hey Lorenzo - Yeah I remember meeting you there :)

Thanks for the info so far, I've made some good progress using the demos to get an idea of what is going on and made some reasonable progress on a module that we'll release as part of the rtc.io suite that will help to interface with Janus. After I've had a chat with Silvia tomorrow (Sydney time) I'll push something up to github.

Cheers,
Damon.

@meetecho
Copy link
Collaborator

Damon,

that would be great indeed, thanks for that! Keep us posted :-)

@meetecho
Copy link
Collaborator

FYI, I've just added the documentation to doxygen. You can read it online here:

http://janus.conf.meetecho.com/docs/rest.html

If it's not clear enough, let me know and I'll try and improve it.

@DamonOehlman
Copy link
Contributor Author

Thanks heaps Lorenzo - the docs look excellent, but if I come across anything I'll let you know.

Cheers,
Damon.

@DamonOehlman
Copy link
Contributor Author

Just wondering how ice candidates are communicated from Janus to the client. I can see in the streaming test example (and in the docs) that SDP is communicated through the jsep attribute in event responses.

At this stage though I can't see how ice candidates are communicated back. Any tips?

@DamonOehlman
Copy link
Contributor Author

I think I'm showing that I spend most of my time with the browser apis with that last question, and from the stuff I've been having a look at today I think the ice candidates are communicated in the sdp. Is this correct?

@meetecho
Copy link
Collaborator

Yes, ICE candidates are communicated in the SDP as part of the negotiation process. In particular, they are sent in the "jsep" field of messages addressed to a plugin, or in events that the plugin sends to you (and to which the gateway attaches the "jsep", as plugins don't handle candidates themselves).

We're of course planning to support Trickle ICE as well in next versions (that is, where you send an SDP without candidates right away and then only the candidates when they're available), but right now the idea was to keep it simple and wait for the candidates to be all available before sending the SDP. In fact, only Chrome supports it right now (even though I know Firefox is working on it), which made things simpler in JavaScript too.

@YtelDrew YtelDrew mentioned this issue Mar 11, 2016
lminiero pushed a commit that referenced this issue Apr 11, 2017
DmitryYudin added a commit to DmitryYudin/janus-gateway that referenced this issue Jan 24, 2019
mom-informative stack unwind if leak detected in so-module

====================================================================================== default:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603af545c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603afa61a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).

====================================================================================== no_fast_unwind:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d445c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f35537d9646 in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x8646)
    meetecho#3 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#4 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#5 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d961a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#3 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#4 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).
kefir266 added a commit to kefir266/janus-gateway that referenced this issue Jan 15, 2020
@ubonass ubonass mentioned this issue Aug 10, 2020
@mightZhong mightZhong mentioned this issue Feb 3, 2021
pimenas referenced this issue in auvious/janus-gateway Nov 17, 2021
Replaced all recordplay with auviousrecordplay in plugin file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants