Streaming Through Firewalls and Proxies
While working on an online TV project for the last 2 months I have realised streaming Adobe Flash video through a firewall or proxy server can be a real challenge. Flash Player's standard behaviour is to attempt to generate a connection on ports 1935, 443, and 80 using RTMP. If those fail, it attempts to connect on port 80 using RTMPT.
Adobe provides good documentation for firewalls and proxy servers but we faced an additional challenge with this project: the client made use of a proxy server that blocked all ports except port 80. Since port 80 is the third port that Flash Player attempts to connect to, there was quite often a noticeable and unacceptable delay between the time the Flash Player loaded in the browser and the time the Flash video started to play.
Since user experience is of paramount importance, we were forced to look for a solution. After some experimentation, we cooked up with a Flash component that does the following:
- 1. Creates a NetConnection object that starts the attempts at port 1935, as is standard.
- 2. Creates a second NetConnection object that waits 250 milliseconds before attempting to connect to port 80 via RTMPT.
- 3. Accepts whichever connection attempt succeeds first. Once a connection attempt is successful, the other NetConnection object is deleted.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home