Hi,
So If i have someone streaming their cam and audio in a room. Then want to redirect that stream in a different room, but make it work in such a way where the user does not have to republish. is that possible. I understand you can be connected in multiple rooms at the same time. but could you detect that the camera is on in one room and redirect the stream into another?
hope that makes sense.
thanks.
...russ
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Russ,
When you connect to any room, you get a connectSession Instance, and whenever any stream( A/V) has to be created, it requires the NetConnection which is obtained from the connectSession instance( Refer to any of the Audio/Webcam Publisher code for details about creating NetStream).
Now if you are redirecting to a different room, it means a completely new connectSession and thus a new NetConnection, so you can't redirect the stream to a different room automatically.
What you can do is , to have your audio/webcam publisher publishing to a different room, something like
audioPub.stop();
audioPub.connectSession = "newSessionInstance" ;
audioPub.subscribe();
audioPub.publish();
to redirect your publisher to the new room that has the new connectSession.
Hope this helps
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi Russ,
When you connect to any room, you get a connectSession Instance, and whenever any stream( A/V) has to be created, it requires the NetConnection which is obtained from the connectSession instance( Refer to any of the Audio/Webcam Publisher code for details about creating NetStream).
Now if you are redirecting to a different room, it means a completely new connectSession and thus a new NetConnection, so you can't redirect the stream to a different room automatically.
What you can do is , to have your audio/webcam publisher publishing to a different room, something like
audioPub.stop();
audioPub.connectSession = "newSessionInstance" ;
audioPub.subscribe();
audioPub.publish();
to redirect your publisher to the new room that has the new connectSession.
Hope this helps
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi,
That was right on. I thought it was something like that.
Makes total sense. Now I have someone pubishing between two rooms using AS to control one of the rooms.
thanks again!
...russ
Views
Replies
Total Likes