javaflashvideored5rtmp

How to handle multiple video streams in Red5?


I am writing a Red5 application that provides 1-on-1 video chat to a Flash client over RTMP.

Unfortunately most tutorials I was able to find were sketchy at best and the documentation of Red5 itself tends to be vague when it comes to API concepts and intended usage.

In short, I am a bit stuck and looking for hints on Red5 ApplicationAdapter implementation. Gnarly details are as follows:

So, all in all, I have a pretty good idea what I am aiming for but how to achieve it with Red5 is still a bit of a mystery.

Hopefully someone can enlighten me in any or all of the following:

  1. What is the easiest way to establish the connection type (visitor/consultant)?

  2. Which API classes should be used to implement a persistent, globally accessible list of active connections for reporting the state of each consultant?

  3. How to switch receving endpoints dynamically when the goal is to connect a specific visitor to the selected consultant?


Solution

  • Saul ,

    1.What is the easiest way to establish the connection type (visitor/consultant)?

    assuming that both(visitor/consultant) are using flex client via which they start publishing their live video stream ,here you need to make sure that each published video stream name is unique (HOWTO is already mentioned in demo apps)

    2.Which API classes should be used to implement a persistent, globally accessible list of active connections for reporting the state of each consultant?

    and for providing the list of active connections you simply need to store(preferably in your db) each user's id with the stream name (which is also available as a tutorial demo app) to connect to.

    I believe all the code is available for the red5 demos Do try oflaDemo , simpleSubscriber , fitcDemo demo apps.

    I hope I am closer to your solution.