Fasting for people like me - people who want to get acquainted closer with the possibilities of red5, but do not know where to start or what to do (for those who hear the word red5 for the first time - a
reference ).
We will need:
- actually red5 itself, you can download it here
www.osflash.org/red5 ;
- for installation it requires JRE -
www.java.com ;
- also, if you want to change something yourself in the client part, you will need Adobe Flash;
- we also need Eclipse
www.eclipse.org/downloads ;
- also download the red5chat sources, which we will install at
www.red5chat.com/download_red5_webcam_chat.htm .
First, download all the sources and install JRE, red5, eclipse. Now let's check red5 - open
http: // localhost: 5080 / in the browser - there you can play around with demos. Briefly about the structure. In the folder C: \ Program Files \ Red5 \ swf \ samples you can find the source files for your client needs (you can change them without any special knowledge of actionscrpt). In the folder C: \ Program Files \ Red5 \ webapps we will add new applications.
So, open Eclipse and create a new project - choose File → Java Project, call our project mychat. In the Package Explorer view, a newly created project with a class library installed in the JRE system has appeared. Right click on the project, New → Folder, call the WEB-INF directory. In the newly created WEB-INF create the classes and src folders.
Now we say to Eclipse that the WEB-INF \ src folder will be used as the root directory for our source files, for this right-click on it Build Path → Use as Source Folder.
')
To store compiled classes, we need to set the WEB-INF \ classes directory. To do this, click the item Project → Properties. Choose Java Build Path → Source tab. At the very bottom we find the Default Output Folder, click Choose and select WEB-INF \ classes.
Then we copy the red5chat \ JAVA-RED5 files into the daddy \ workspace \ mychat \ WEB-INF, right-click on our project in Eclipse and do a refresh. Eclipse will start swearing exclamation marks. She lacks libraries. Add them to it - click the Project → Properties item, select the Java Build Path, then the Libraries tab and click Add External JARs, find the red5.jar installation directory Red5. In a similar way, you will need to add the commons-logging-1.1.jar library from the C: \ Program Files \ Red5 \ lib folder to your project (sometimes it may not be there - it can be easily found on the network). Our project is ready - click Project → Build All.
Now we copy the files from the workplace Eclipse \ workspace \ mychat \ WEB-INF into the previously created C: \ Program Files \ Red5 \ webapps \ mychat.
Open the downloaded red5chat \ FLA \ red5chat.fla and change the server there if necessary (by default, nothing needs to be changed). We publish all this in red5chat.swf. The resulting flash drive can be inserted into the HTML code (with the object tag) and run on a locale, or opened directly.
You can also open your chat, for example, in the local network - just add the required host in C: \ Program Files \ Red5 \ webapps \ mychat \ WEB-INF \ red5-web.properties. At the same time, do not forget to re-publish red5chat \ FLA \ red5chat.fla, introducing a different value instead of _root.IP = "127.0.0.1".
UPD: useful links on the topic
-
garbage-collector.ru/2007/06/27/getting_started_with_red5_server-
www.flasher.ru/forum/showthread.php?t=103845-
jwamicha.wordpress.com/2007/01/29/create-a-new-java-red5-application-
rchik.habrahabr.ru/blog/55656-
www.actionscript.org/resources/articles/617/1/Streaming-and-database-connection-with-red5-media-server/Page1.html