Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

21- Create Client App to Access Red5 Server App

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
12,503
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 13, 2010

Create Flash Client app (swf) to access Red5 server app.

HERE IS THE CODE:

import flash.net.NetConnection;
import flash.net.Responder;

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/testapp");
nc.addEventListener(NetStatusEvent.NET_STATUS, netConnectionHandler);
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

var nr:Responder = new Responder(netResponderHandler);
nc.call("add", nr, 2, 3);

function netConnectionHandler(evt:NetStatusEvent)
{
trace("status: " + evt.info.code);
}

function securityErrorHandler(evt:SecurityErrorEvent):void {
trace("securityErrorHandler: " + evt);
}

function netResponderHandler(serverResult:Object)
{
trace("The result is " + serverResult);
}

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (8)

Sign In or Sign Up now to post a comment!
  • i've got an existing error:

    Closing RTMPMinaConnection from 127.0.0.1 : 2394 to localhost (in: 3330 out 3258 ), with id 15365781 due to long handshake

    can you tell me what you wrote in xml and properties files? Thanks

  • cant make one video for streaming a webcam from you red5 server?

  • copying above code wont work cos he did not import the necessary classes

    import flash.events.*;

  • "if it doesn't work, restart your computer" .. let me guess, you are a Windows developer, right?

  • thanks for the code :)

  • Hi, great video.

    Is this the last one for now?

    Thanks, Peter

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more