to answer the question of the best way to dynamically connect to streams.
I would create a class that handles the streaming of video whether it be RECEIVING video or PUBLISHING video and they you can pass in all the data that the stream needs to broadcast or play back..
I would also build a manager that handles all the creation of the netstream creations and passing you back the class instance of the netstream or a custom class with extra functionality.
I have already built an entire P2P/Stream video conference system that handles max users, allow/disallow video / audio, specify an admin for a individual conference room so someone can manage the flow of conversation if need be etc..
here is an example of the call my system makes to get a netstream object:
netGroupStream = NetGroupManager.create(NetGroupStream.RECEIVE_STREAM,_groupID,_peerID,_localID,_useP2P);
netGroupStream.connection = nc; netGroupStream.addEventListener(NetGroupStreamEvent.STREAM_START,onStreamStart,false,0,true); netGroupStream.addEventListener(NetGroupStreamEvent.STREAM_STOP,onStreamStop,false,0,true);
from here you can now start listening for when someone stops publishing or starts publishing.. i also have functionality in to detect if one stream as more audio data so i can determine whos talking..
its limitless if you create your own structure.
So classes is the way to go.
Just my two cents
* Last updated by: kjeske on 3/24/2011 @ 2:10 AM *