Search code examples
flashactionscriptrtmpnetstream

How to relay incoming NetStream to outgoing


Is it possible to make some kind of relay, to rebroadcast received stream to another host? For example, if i have code like this

nsOut = new NetStream( outgoingNetConnection );
nsOut.client = {};
nsOut.addEventListener( NetStatusEvent.NET_STATUS, onNetStatus );       

nsIn = new NetStream( incomingNetConnection );
nsIn.client = {};
nsIn.addEventListener( NetStatusEvent.NET_STATUS, onNetStatus );

How to connect this two streams to make direct transfer from nsIn to nsOut ?


Solution

  • No that is not possible within Flash. You might be able to solve it with a server, using for example Red5 to connect the incoming stream to an outgoing stream.