0

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
calmchess
  • 118
  • 8

1 Answers1

0

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

netstream.attachCamera(null);
rarho
  • 41
  • 1
  • stream0.attachCamera(cam0); stream0.publish("stream00", "live"); var metaData:Object = new Object(); metaData.roomname = "room0"; metaData.duration = "live"; metaData.width = cam0.width; metaData.height = cam0.height; stream0.send("@setDataFrame" , "onMetaData", metaData); – calmchess Apr 28 '13 at 19:39
  • I had to do both netstream.attachCamera(null); and netstream.close other wise the recorded file was corrupt – calmchess Apr 29 '13 at 15:27