Search code examples
actionscript-3flashcameraflash-media-servernetstream

flash media server (FMS) reattach camera to new stream


I'm using flash media server and trying to record the stream but having a problem as I've outlined below. Thanks for taking the time to read this post.

How do I detach my camera from one stream and attach it to a new stream? What I'm trying to do is record the camera stream for 10 seconds and then play it live on a different stream..I try to netstream.close and then netstream.attachCamera(cam0) but it won't let me attach it to the second new stream. What's wrong?


Solution

  • You dont have to close the stream. You can use the attachCamera method with a null argument.

    netstream.attachCamera(null);