0

Does anyone know if it's possible to attach a Microphone instance to multiple NetStream instances? I'm calling attachAudio on two different NetStream instances and I don't get an error message but it's not working either. What's the expected behavior with the following code example?

NetStream stream1 = new NetStream(connection1);
NetStream stream2 = new NetStream(connection2);

Microphone mic = Microphone.getMicrophone(-1);

stream1.attachAudio(mic);
stream2.attachAudio(mic);

stream1.publish();
stream2.publish();
KBoek
  • 5,794
  • 5
  • 32
  • 49

1 Answers1

1

For those who are interested: yes it works. You can reuse the Microphone and Camera singleton instances and publish to multiple NetStream instances.

KBoek
  • 5,794
  • 5
  • 32
  • 49
  • 1
    Glad you found out that it works, it might be helpful to edit your answer and include what it was that made it work (as your code in the question seemed fine). You might help someone else out down the road :) – Sunil D. Sep 25 '13 at 19:56