I'm subscribing to only one of many publishers, one at a time (video monitor). So, I initially open all subscribers and when the onconnected event is fired, I store each of them in a hash table (stream.connection.data holds ID). I subscribe to the first, then unsubscribe and subscribe to the next. However, I've had to kill the onconnected event handler so they didn't keep firing multiple times: Tokbox streamCreated being called same number of times client is called
Now, when a new participant joins the session late (after the event handler has been removed) I don't know how to subscribe to their stream since no event fires. I know they have connected and are streaming because I get a message from their application that contains the ID of their stream.
So, I need a way to iterate through all the steams in the session, find the new one, and subscribe to it when it's that person's turn. How, can I get all the streams in a session and look at their connection ID's?