[Red5] how to build a full chat web application like paltalk.com based on red5?

627 views
Skip to first unread message

alrazy

unread,
Apr 17, 2011, 9:24:50 AM4/17/11
to red5in...@googlegroups.com

hi i am a new programmers but i have maybe big dreams !!
i want to develope and build my own chat website very professional chat like
paltalk.com !!
what i need to study first before i start in my project ?
1)php/mysql/amfphp/flex/Actionscript123?!/flex/flash where to start i am so
confused where to begin !!?
2)do i need to touch the red5 java code or just to config some configuration
files ? do i need to study java ?
3)i cant find any books teaching how to programm a basic pro chat
application using red5 ///
4)is there a better way to build such chat app like new sockets features in
html5 ?
please advice me i am so confused !
--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31417469.html
Sent from the Red5 - Interest/Users mailing list archive at Nabble.com.

DZS|All-In-One

unread,
Apr 18, 2011, 6:33:51 AM4/18/11
to red5
1) To begin, you will need to learn how to use ActionScript 2 or 3
(Although ActionScript 3 are mostly used and faster process than
ActionScript 2). You will be taking a lot of work coming from
developing flash client application.

2) To make your own application, yes you need to make red5 java
application (Yes you will need to learn Java in order to make one). If
you are studying how to use ActionScript communicate and/or establish
connection for chat from Red5, then use oflaDemo application. It is
already prepped for any kind of works in order to know if your flash
client application is establish correctly.

3) You can find couple tutorial on the web plus a couple from
http://wiki.red5.org , they have documentations including some
tutorial how to make red5 java application.

4) I have not experience with HTML5 much and HTML5 doesn't apparently
not support RTMP protocol (yet). However there are work around by
using xuggler (ffmpeg) for transcoder to HTML5 format compatible.

On Apr 17, 8:24 am, alrazy <alra...@hotmail.com> wrote:
> hi i am a new programmers but i have maybe big dreams !!
> i want to develope and build my own chat website very professional chat like
> paltalk.com !!
> what i need to study first before i start in my project ?
> 1)php/mysql/amfphp/flex/Actionscript123?!/flex/flash where to start i am so
> confused where to begin !!?
> 2)do i need to touch the red5 java code or just to config some configuration
> files ? do i need to study java ?
> 3)i cant find any books teaching how to programm a basic pro chat
> application using red5 ///
> 4)is there a better way to build such chat app like new sockets features in
> html5 ?
> please advice me i am so confused !
> --
> View this message in context:http://old.nabble.com/how-to-build-a-full-chat-web-application-like-p...

alrazy

unread,
Apr 18, 2011, 1:29:09 PM4/18/11
to red5in...@googlegroups.com

hi , thank you

and why i need to use phpamf in such application ?

best regards.

--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31425941.html

Jeffrey Anderson

unread,
Apr 18, 2011, 1:53:35 PM4/18/11
to red5in...@googlegroups.com
This won't address your question about the "need" to use phpamf exclusively for chat, but to address your earlier question (#3) about not being able to find any books on red5, there's a complete chat example in this book on page 346:


(Yes you'll have to purchase the book to get the example)

Chris Allen

unread,
Apr 18, 2011, 2:46:40 PM4/18/11
to red5in...@googlegroups.com
You don't actually need to write any Java code to make a decent chat application. You can manage all the shared objects from the client side. Since the client side is all the same with both Flash Media Server and Red5, I would look into some examples written for that server as well. I hope that helps.

-Chris

On Apr 18, 2011, at 2:38 PM, alrazy wrote:

>
>
> i have this book but the example doesnt include a good chat example , its
> very basic beside that i dont see any java code there !!?
> does that mean i dont need any java knowledge to build my own chat rooms app
> and its just a client matter that maybe will need to connect to phpamf for
> user registration or login and managing the chat rooms for users and admins
> prespectives ?
>
>
> --
> View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31426628.html

alrazy

unread,
Apr 18, 2011, 2:38:42 PM4/18/11
to red5in...@googlegroups.com

i have this book but the example doesnt include a good chat example , its
very basic beside that i dont see any java code there !!?
does that mean i dont need any java knowledge to build my own chat rooms app
and its just a client matter that maybe will need to connect to phpamf for
user registration or login and managing the chat rooms for users and admins
prespectives ?


--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31426628.html

alrazy

unread,
Apr 18, 2011, 3:29:57 PM4/18/11
to red5in...@googlegroups.com

hi chris
i am confused regarding "Creating simple chat using SoSend" it says :

In SoSend, So means SharedObject, and Send refers to the method in which
you’ll send and receive
messages from the Red5 server. This is different from the simple chat client
that uses SharedObjects
and simply changes a property on the SharedObject to push a new message to
the clients (see the
earlier SimpleBall sample). This demo sends and receives messages from Red5
and other users by calling
a method on the server side via SharedObject.
Confused? Let’s take a look at the code; it’s really pretty straightforward:
my question : the following code is just actionscript/flex client or its a
java server side code ??!!

import mx.utils.Delegate;
// create basic netConnection object
var nc:NetConnection = new NetConnection();
// connect to the local Red5 server
nc.connect("rtmp://localhost/oflaDemo");
// create StoredObject - pass the name of the shared object,
// the netConnection URI ("rtmp://localhost/oflaDemo"),
// and whether or not it's persistent
var so:SharedObject = SharedObject.getRemoteå
("simpleChatDemo", nc.uri, false);
// set up the handler for the new messages
// and delegate them to a local function
// this method will be called from the server when so.send is called.
so.newMessage = Delegate.create(this, newMessageHandler);
// connect to the SO using the netConnection reference
so.connect(nc);
// listen for the send button clicks
send.addEventListener("click", Delegate.create(this, sendMessage));
// add a listener for key events
Key.addListener(this);
function sendMessage():Void
{
// send via call to method on all the shared objects
// this will be reflected back down to clients by the server
so.send("newMessage", message.text);
// clear text input
message.text = "";
}
function onKeyUp():Void
{
if(Key.getCode() == 13 && message.length > 0)
{
// if ENTER was hit and there's a message to send,
// call sendMessage()
sendMessage();
}
}
347
BUILDING SOME RED5 APPS
function newMessageHandler(newChat:String):Void
{
// return if newChat is null
if(newChat == null) return;
// show in chat
history.text += newChat + "\n";
// scroll the chat window
history.vPosition = history.maxVPosition;
}


346


You don't actually need to write any Java code to make a decent chat
application. You can manage all the shared objects from the client side.
Since the client side is all the same with both Flash Media Server and Red5,
I would look into some examples written for that server as well. I hope that
helps.

-Chris


--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31427047.html

alrazy

unread,
Apr 18, 2011, 3:31:12 PM4/18/11
to red5in...@googlegroups.com


346


You don't actually need to write any Java code to make a decent chat
application. You can manage all the shared objects from the client side.
Since the client side is all the same with both Flash Media Server and Red5,
I would look into some examples written for that server as well. I hope that
helps.

-Chris


--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31427051.html

alrazy

unread,
Apr 18, 2011, 3:50:24 PM4/18/11
to red5in...@googlegroups.com

i dont understand the explanation of how all this work !!! ???
i understand nothing !!! anybody understand how this should work ?
he say :
Two methods make this application work: sendMessage() and
newMessageHandler(). To send a new
chat message, all you have to do is call so.send(nameOfServerMethod:String,
newMessage:String),
and the message will be pushed out to all clients connected to this
application. In this sample, that
equates to so.send("newMessage", message.text). At this point, you might be
wondering where this
newMessage method is defined—is it on the server side or client side? It’s
actually defined on the client
side. When you set this on the client side, it tells Red5 to create it on
the server. You can see that I’ve
defined the newMessage method on the SharedObject and created a handler for
it in this one line:
so.newMessage = Delegate.create(this, newMessageHandler);
Now, any client that connects to this SharedObject using this code will have
created a handler for this
method and will receive the new message from any of the clients that call
it. On the receiving client’s
side, newMessageHandler is called with a new chat message (String value)
and—bingo!—you’re up and
running.
This technique is nice in that you don’t have to listen for sync events on
the SharedObject; you just
define a method and a method handler, and it works like all the other
methods in your class.
348


--
View this message in context: http://old.nabble.com/how-to-build-a-full-chat-web-application-like-paltalk.com-based-on-red5--tp31417469p31427180.html

Reply all
Reply to author
Forward
0 new messages