views:

562

answers:

2

I'm using BulkLoader to load an array of 10 or so FLV files. I want to be able to use and control these FLVs throughout my app independently. So for instance, FLV_1 may be displayed in duplicate but I want to pause one instance and play the other in tandem.

I would like to pass the NetStream object around to other Video objects and display both. Is this possible? If so, how do I go about doing it?

A: 

Hi Sanders.

It's definitely possible. BulkLoader will expose you the NetStream object, so you can pass it around to Video or anything else, for example:

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");

Regards

Arthur Debert
A: 

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

On the other hand you can probably play the same instance of a NetStream synchronously within different Video instances (to be double checked!).

Probably the easiest hack would be to load the same FLV into two different items (in case you use BulkLoader) referencing them with unique ID's and hoping the end-user has his browser cache enabled. Thereafter you would add and control each NetStream separately just as if you were handling two different movies.

Theo.T