iOS Toolkit : Sample Code

- (void)viewDidLoad { [super viewDidLoad]; //To init EnxRtc object EnxRtc *enxRtc = [[EnxRtc alloc]init]; // To join the room, call joinRoom: which returns localStream Object. EnxStream *localStream = [Objectjoin joinRoom:respinseDict[@"token"] delegate:self PublishStreamInfo:LocalStreamWithOption]; localStream.delegate = self;   // set frame to show the local stream. CGRect frame = CGRectMake(0, 0, 100.0, 150.0); //Init playerView object to render the localStream.    EnxPlayerView *playerView = [[EnxPlayerView alloc] initWithFrame:frame]; // Add player view as subView of parentView. [self.view addSubview:playerView]; [localStream attachRenderer playerView]; } // Room delegate methods: - (void)room:(EnxRoom *)room didConnect:(NSDictionary *)roomMetadata { // publish local stream success of room connect. [enxRoomObject publish:_localStream]; } - (void)room:(EnxRoom *)room didError:(NSString *)reason{ // Error while connecting to the room. } - (void)room:(EnxRoom *)room didAddedStream:(EnxStream *)stream { // Streams which are added in the room. subscribe to all streams added. [room subscribe:stream]; } - (void)room:(EnxRoom *)room didSubscribeStream:(EnxStream *)stream { // handle subscribed stream here CGRect frame = CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height); EnxPlayerView *playerView = [[EnxPlayerView alloc] initWithFrame:frame]; [self.view addSubview:playerView]; [stream attachRenderer:playerView]; } // For Active talker mode -(void)room:(EnxRoom *)room activeTalkerList:(NSArray *)Data{ // This delegate will call every time when active talker list gets updated and user will get the new active list. } Where is Data: { "active" : true, "activeList" : [ {"streamId":"1","mediatype" : "audiovideo", "clientId" : "a334a039-90af-4c5d-93ad-6f71ea20a36a", "name":"abc"}, {"streamId":"2","mediatype" : "audio", "clientId" : "b334a039-90af-4c5d-93ad-6f71ea20a36b","name":"abc1"}, {"streamId":"3","mediatype" : "audio", "clientId" : "c334a039-90af-4c5d-93ad-6f71ea20a36c","name":"abc2"}, {"streamId":"4","mediatype" : "audiovideo", "clientId" : "d334a039-90af-4c5d-93ad-6f71ea20a36d", "name":"abc3"}, {"streamId":"5","mediatype" : "audiovideo", "clientId" : "e334a039-90af-4c5d-93ad-6f71ea20a36e", "name":"abc4"}, {"streamId":"6","mediatype" : "audiovideo", "clientId" : "f334a039-90af-4c5d-93ad-6f71ea20a36f", "name":"abc5"} ] }