Skip to main content
January 9, 2010
Beantwortet

Can Flash plug-in connects directly (or quicker) with RTMP over HTTP ?

  • January 9, 2010
  • 1 Antwort
  • 962 Ansichten

I am connecting FMS over RTMP from a firewalled network where RTMP is blocked.

Connecting to my FMS server from there takes (a toooooooooooooooo loooooooooooooooooooong) one minute before the Flash client switches from RTMP to encapsulated RTMP into HTTP.

Is there any way to by pass this delay or is it a plug-in inner behavior that cannot be short-cut ?

Thanks for help,

François

    Dieses Thema wurde für Antworten geschlossen.
    Beste Antwort von Robert Reinhardt

    The best approach is to fire off three NetConnection instances, each targeting a different port/protocol:

    var nc1:NetConnection = new NetConnection();

    var nc2:NetConnection = new NetConnection();

    var nc3:NetConnection = new NetConnection();

    // add event listeners, etc.

    nc1.connect("rtmp://your_server/blah/blah"); // default port, 1935

    nc2.connect("rtmp://your_server:80/blah/blah"); // rtmp, port 80

    nc3.connect("rtmpt://your_server/blah/blah"); // HTTP tunneled RTMP, port 80

    whichever one gets "NetConnection.Connect.Success" wins, and cancel out the other two. Brian Lesser talks about this approach in an old DevNet article on Adobe.com, and it still a sure fire way to go.

    HTH.

    -Robert

    --

    Robert Reinhardt

    Creator, videoRx.com

    Author, Flash Bible series and Video for Adobe Flash CS4 Professional Studio Techniques

    Adobe Community Expert

    http://blogs.flashsupport.com/robert

    1 Antwort

    January 9, 2010

    As they usually say in that case :RTFM !

    Explanations here : http://help.adobe.com/en_US/FlashMediaServer/3.5_TechOverview/WS5b3ccc516d4fbf351e63e3d119ed944a1a-7ffa.html

    A client can try first rtmp:// URL, 3 ports will be tested 30 seconds each : 1935 / 443 / 80. In my case 1935 is forbidden by firewalls and 443 is not pluged-on FMS on the server. Finally 80 works fine after 60 seconds.

    But a client can try connections with URLs like this : rtmp://myservice.com:443/my_application or rtmp://myservice.com:80/my_application.

    So the 60 seconds can be progammaticaly shortened but cancelling first URL (rtmp with native 1935) after 10 seconds then trying rtmp over TCP 80.

    The client can also connect using URL rtmpt:// that uses port 80

    Or rmtpe:// with the same comportement than rtmp://

    Or rtmpte:// that uses TCP 80.

    So much choice. So much fun.

    François

    Inspiring
    January 13, 2010

    The best approach is to fire off three NetConnection instances, each targeting a different port/protocol:

    var nc1:NetConnection = new NetConnection();

    var nc2:NetConnection = new NetConnection();

    var nc3:NetConnection = new NetConnection();

    // add event listeners, etc.

    nc1.connect("rtmp://your_server/blah/blah"); // default port, 1935

    nc2.connect("rtmp://your_server:80/blah/blah"); // rtmp, port 80

    nc3.connect("rtmpt://your_server/blah/blah"); // HTTP tunneled RTMP, port 80

    whichever one gets "NetConnection.Connect.Success" wins, and cancel out the other two. Brian Lesser talks about this approach in an old DevNet article on Adobe.com, and it still a sure fire way to go.

    HTH.

    -Robert

    --

    Robert Reinhardt

    Creator, videoRx.com

    Author, Flash Bible series and Video for Adobe Flash CS4 Professional Studio Techniques

    Adobe Community Expert

    http://blogs.flashsupport.com/robert

    January 14, 2010

    Thanks Robert, I was thinking about it and I am definitely going to try it.

    François