I'm trying to attach a single NetStream Object to two separate Video objects instead of pulling redundant streams from the server. The expected behavior would be for both Video's to display the same content. However, it seems that the last video I attach the NetStream to is the only Video that will display the content.
Has anyone else run into this? I'd rather not go to the inelegant steps of using BitmapData to clone pixels if I don't have to.
Thanks
As of Flash 10.1 Adobe finally added some new functionality for connecting directly to the bytes for the NetStream object. The new method is called appendBytes, which as it suggests allows adding bytes programatically to the NetStream object. This is primarily used for Adobe's support of HTTP streaming (finally). There is some more info and demos for this here at bytearray.org.
What this means is that what you may be able to do is stream your video using HTTP streaming. You can get your video streamed using HTTP streaming, then feed your two different NetStreams with the bytes from the single HTTP stream. So you get your bytes from HTTP streaming, then you call ns.appendBytes(inputbytes) on each NetStream object. You'll have 2 NetStream objects, but it will save you the bandwidth of trying to pull redundant streams for each.
What you may then run into is that you have skipping between your video segments if you try to roll your own video splitter. Adobe supports the HTTP stream splitting in its video server, but I haven't been able to find a good reference that shows how do roll this myself.
Ummm, isn't it kinda dumb to decode the video stream twice? Using BitmapData.draw() in an enterFrame handler to copy the video is simple and efficient.