[Red5] How to correct NetConnection.Connect. InvalidApp.

Dominick Accattato daccattato at gmail.com
Tue Feb 17 06:21:22 PST 2009


the last slash won't/shouldn't matter.  It is as Manuel points out a
configuration issue.  If at any point in your development you don't have
correct configs, then you will experience an invalidApp... and on the server
your logs will show, that you have a "long handshake" error.



On Tue, Feb 17, 2009 at 3:16 AM, Manuel Raña <info at vengava.com> wrote:

> try without last slash:
>
> rtmp://localhost:1935/videoStore
>
>
>
> 2009/2/17 Santosh Dhakal <sanimap at gmail.com>
>
>> Dear users,
>>                     I have poperly installed and used Red5 server.My first
>> application was a video player which accesses the flv videos stored in red5
>> server.It was successfully done but now I am doing a simple recorder in AS3
>> which records webcam videos and stores on the red5 server.
>>                    But during NetStatusEvent of NetConnection I couldn't
>> get NetConnection.Connect.Success ,instead I repeatedly get
>> NetConnection.Connect.InvalidApp.
>> Following is my AS3 code,please guide me on this.
>>
>> package
>>  {
>>
>>   import flash.display.MovieClip;
>>   import flash.media.Camera;
>>   import flash.media.Microphone;
>>   import flash.media.Video;
>>   import flash.net.NetConnection;
>>   import flash.net.NetStream;
>>   import flash.events.NetStatusEvent;
>>   import flash.events.AsyncErrorEvent;
>>   import flash.display.SimpleButton;
>>   import fl.video.FLVPlayback;
>>   import flash.text.*;
>>   import flash.system.SecurityDomain;
>>   import flash.system.Security;
>>
>>   public class VideoRecorder extends MovieClip
>>    {
>>     private var connector:NetConnection;
>>     private var ns:NetStream;
>>     private var cam:Camera;
>>     private var mic:Microphone;
>>     public function VideoRecorder()
>>      {
>>        trace("Online recorder");
>>        Security.allowDomain("*");
>>        connecting();
>>      }
>>     private function connecting():void
>>      {
>>       connector = new NetConnection();
>>       connector.connect("rtmp://localhost:1935/videoStore/");
>>       connector.client=this;
>>
>>       connector.addEventListener(AsyncErrorEvent.ASYNC_ERROR,sync_error);
>>
>> connector.addEventListener(NetStatusEvent.NET_STATUS,net_status_handler);
>>
>>
>>
>>
>>      }
>>     public function OnBWDone():void
>>      {
>>       trace("Study this functions");
>>      }
>>
>>     private function sync_error(event:AsyncErrorEvent):void
>>      {
>>       trace(event);
>>      }
>>     private function net_status_handler(event:NetStatusEvent):void
>>      {
>>       var code:String = event.info.code;
>>       trace(code);
>>       info_txt.text = code;
>>       if(code== "NetConnection.Connect.Success")
>>        {
>>         trace("Success");
>>         start_recording();
>>        }
>>       else
>>        {
>>         trace("Fault");
>>         trace(code);
>>        }
>>      }
>>    private function start_recording():void
>>     {
>>       trace("Start to record");
>>       cam = Camera.getCamera();
>>       mic = Microphone.getMicrophone();
>>     }
>>    }
>>
>>
>>
>>  }
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>


-- 
Dominick Accattato, CTO
Infrared5 Inc.
www.infrared5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090217/8945026b/attachment.html>


More information about the Red5 mailing list