How do I copy a NetStream object?

I am using BulkLoader to load an array of 10 FLV files. I want to be able to use and control these FLVs in my application independently. So, for example, FLV_1 may appear in duplicate, but I want to pause one instance and play the other in tandem.

I would like to pass a NetStream object to other Video objects and display them. Is it possible? If so, how should I do this?

0


a source to share


2 answers


This is definitely possible. BulkLoader will give you a NetStream object, so you can pass it in video or whatever, like:

var videoItem : VideoItem = bulkLoader.get("my-video.flv");
var video : Video = new Video();
video.attachStream(videoItem.content);
// or the shortcut:
video.attachStream(bulkLoader.getNetStream("my-video.flv");

      



Hello

0


a source


Haven't tested this, but logically, you won't be able to play more than one video containing the same NetStream instance asynchronously , simply because pause / play / etc. the methods run directly on the NetStream instance (not on video containers ...).

On the other hand, you could possibly play the same NetStream instance synchronously in different video instances (to be double checked!).



Probably the easiest hack would be to load the same FLV onto two different items (if you are using BulkLoader), referencing them with a unique ID and hoping the end user has enabled the browser cache. After that, you added and controlled each NetStream separately, as if you were processing two different movies.

0


a source







All Articles