Skip to main content
Participant
July 29, 2013
Question

How to relay a NetStream to FMS?

  • July 29, 2013
  • 1 reply
  • 3650 views

I am trying to make the incomingNetStream relay to a FMS (on another machine). The incomingNetStream is in a sample code that has an incoming and an outgoing stream. I want to publish the incomingNetStream to the AMS.


The RTMP Url is not apparent, so I can't think of a way of how to accomplish this.

I'm fairly new to Flex, and AMS so any help would be appreciated.

Thanks.

This topic has been closed for replies.

1 reply

Participating Frequently
July 29, 2013
Participant
July 29, 2013

Actually, the code is already already on the client side.

Here's a code snippet from the code:




private function setupStreams():void {




onDebug("Setup media streams");









if (mic == null || mic.index != mic_index) {





setupMic();




}









incomingNetStream = new NetStream(netConnection);




incomingNetStream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);




incomingNetStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);




incomingNetStream.client = this;




incomingNetStream.bufferTime = 0.2;




//incomingNetStream.play("play");




//incomingNetStream.receiveAudio(true);





outgoingNetStream = new NetStream(netConnection);




outgoingNetStream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);




outgoingNetStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);





outgoingNetStream.attachAudio(mic);




outgoingNetStream.publish("publish", "live");



}

Thanks for the reply .