v0.0.X

How to use nextrtc in java project

NextRTC is designed to be easy to integrate with existing solution.

First step is to add to your maven project dependency to latest version of nextrtc-signaling-server.

Then you have to expose your websocket channel, to allow js client to connect to server. In NextRTC you can do it by creating class:

Here you can read more about ServerEndpoint annotation.

In next step you have to import NextRTC configuration for example by adding following annotation in your java configuration class:

Now you are ready to handle events coming from signaling server.

The easiest way to do it is by creating class which will write some data to your db, or run some business method. To write handler you have to write class with following annotation:

As you can see two required things is to implement interface NextRTCHandler and add annotation @NextrRTCEventListener(with event which should be handled by this class)

Example of use you can see in project (handle session opened, or other handlers)

Classes used in this doc are taken from project mentioned above.

Leave a Reply

Your email address will not be published. Required fields are marked *