Skip to content
Gaetan Siry @ AVSPEED edited this page Jan 7, 2018 · 4 revisions

iConfRTC SDK Test project for .NET Windows Forms

Thank you for trying out the iConfRTC SDK.

The iConfRTC SDK allows you to easily create webrtc desktop applications easily.

We WebRTCTestWinform project is a .NET application similar to the AppRTC application.

You type in a meeting ID, your name, press on and you are in! If any one else is in the same meeting, you can have a video/audio conference with the other meeting participants. You can also chat with them via text.

The code is fairly simple

We initialize the Web RTC engine ( this is important .. if you do not initialize the WebRTC engine, you will get an exception

RTC.Init(); 

Next, we setup our signaling url and signaling type

iconfRTC.SignalingUrl   = ConfigurationManager.AppSettings["SignalingUrl"].ToString();
iconfRTC.SignalingType  = SignalingTypes.Socketio;

this demo uses the RTCSignaling.io server, an open source node server that uses socket.io that runs off of a Windows 2012 server.

You can host your signaling server wherever you want ( on azure if you like .. the setup is fairly simple).

To join a Meeting we use the JoinMeeting method passing a user name and a meeting ID ( example : user1, "MyMeeting" )

iconfRTC.JoinMeeting(user, meetingID);

When a user joins a meeting, the UserJoinedMeeting event gets fired

When that event fires, we process the list of meeting participants and create and iConfRTC 'viewer' instance for each one of the participants ( excluding your own )

private void IconfRTC_UserJoinedMeeting(object sender, UserArgs e)
{
     ProcessParticipants(e.Participants);
}

e.Participants contains a list of participants a each participant has a session ID which we will use to view each participant's session

We loop through this list of participants and create a 'viewer' instance of the iConfRTC control, call RTC.Init on the viewer, and when initialized view the session of the participant

viewer.RTCInitialized += (((object a) =>
{
     viewer.ViewSession(participant.Session);
}));
Clone this wiki locally