0 Replies Latest reply on Sep 18, 2008 8:21 AM by Kristian Wright

    Multiple Videos Using Single NetStream

    Kristian Wright Level 1
      Hi!

      I've got an application that streams pre-recorded videos from FMS. I can connect and stream the videos perfectly by attaching a NetStream to my Video with the following line:

      myVideo.attachNetStream(myNetStream);

      It all works perfectly.

      But I want to stream the same video to 2 different Video objects at the same time. When I do the following:

      myVideo.attachNetStream(myNetStream);
      myVideo2.attachNetStream(myNetStream);

      the NetStream is removed from myVideo and only myVideo2 displays the video! I can obviously get around this by creating a second NetStream object and use that with myVideo2, but this will mean that I'm getting 2 streams from FMS, when they are in practice going to be the same stream.

      I've got not controls for the stream - meaning that I'm not going to pause, rewind, play etc. I understand if this was the case then actions performed on the stream would impact both Videos. But all I'm doing is playing the stream from start to finish.

      So my question is - is this possible? Is there a way to attach a single NetStream to multiple Video objects and have them all play the same stream?

      If not, here's what I'm trying to achieve anyway (perhaps there's a better way without using the above method):

      I want to display a video streamed from FMS, but I want to mask it with a draggable 'keyhole' kind of thing to show the video through the keyhole. But rather than having the rest of the video completely masked out, I want to have a second video playing that is blurred out. I'll have my blurred video, then my mask, then my real video, masked.

      So in essence, there will be a blurred video, with clarity only in the dragable portion of my mask.

      I've got all of this working, except for the issue outline above. If I do use a second NetStream (something I'm quite opposed to), the best I can get is a blurred video playing, with a dragable mask showing clear video, that is slightly out of sync with my blurred video. The lack of syncronisation is another reason I don't want 2 NetStreams, as well as the obvious overhead to FMS.

      If anyone knows of a better way to do this that I'm doing, please let me know!! ;-)

      Thanks in advance,
      K.