3 Replies Latest reply on Apr 30, 2009 10:20 AM by justdanyul

    Flex, AIR and remote video streams

    justdanyul Level 1

      Lets say I want to connect two AIR applications, running on two different workstations and feed video directly from one to the other. How would I go about that? Would it be possible of using the NetConnect and NetStream classes?


      The documentation of NetConnect says basically, if its not connecting to FMS, it can connect to a local file or a file on a webserver. However, the same documentation also says that the command parameter of the connect method is of the following form:




      so, i am just wondering what protocols are supported? would TCP: or UDP: work? (i doubt it since it seems like it requires a filename to access rather than just a port)


      Since the framework support non-blocking writes to a file, I was thinking it might be possible to connect the two clients with using the Socket classes and then write the incoming stream to a file, which then could be read by NetConnect+NetStream.


      It just seems terribly backwerds and it also brings on another problem on the client sending the stream, if I use NetConnect+Netscream to connect to a file, and uses the send/broadcast functionality, will it actually write it to this file? And aditionally, would it be a blocking writer? Ffrom looking at this part of the framework, i really suspect adobe wants me to use FMS full stop (i mean, how hard would it be to offer a generic binary stream?).. which is fair play, but, it doesn't make sence for any type of AIR application which needs to send sound our video directly to another client. You might think, why not "just" use FMS, but the thing is:


      A: why would i? this is a 1-to-1 very simple "on/off" stream? why put a server between two clients just for the sake of it?
      B: video would leech quite a bit of bandwidth on the server, server bandwidth costs money, client internet connection bandwidth are free in most cases.


      With all this said, I dont know alot about FMS..  would it let one client register a stream on the server, and then have other clients connect directly to that client when subscribing to the stream? or does the steam need to go though the server?


      Anyways, any input would be appriciated, the question is pretty simple really. Direct video connection between two AIR clients.. thougths?