0

I'm working on a webcam video streaming application utilizing Flash 8 (AS2) and Flash Media Server 3. Streaming the video live is fairly trivial, but I want to give the publisher the ability to pause their stream, effectively giving the people watching a snapshot instead of realtime video.

NetStream has a pause() method, but the documentation says it only applies to subscribers. Is there any way to pause the publishing of a stream?

Herms
  • 37,540
  • 12
  • 78
  • 101

1 Answers1

5

Pause:

  ns.attachCamera(null);

Resume:

  ns.attachCamera(Camera.getCamera());
tst
  • 3,321
  • 1
  • 16
  • 7
  • on AMS5.0.3 this actually screws up the recording metadata by the sum of all seconds that the recording has been paused; if you are using it for publishing/subscribing to live data - this is not an issue; if you, however, want recordings with clean metadata - this is not the solution – Grigorash Vasilij Apr 03 '14 at 14:43