I am using Iconf.net Sdk to do video conferencing. Right now audio conference calls works perfectly. But when i try to view users video its not showing up. Here is my code
Initialization
icc = new iConfClient.NET.iConfClientDotNet();
ics = new iConfServerDotNet();
pnlics.Child = ics;
ics.Show();
pnlicc.Child = icc;
icc.Show();
icc.SetImage(null);
Button event from which call is genrated
private void CentralServerCall_Click(object sender, RoutedEventArgs e)
{
try
{
callType = "Video";
ArrayList usersToInvite = new ArrayList();
if (UserName.Text == "user2")
usersToInvite.Add("user1");
else
usersToInvite.Add("user2");
ics.SelectVideoDevice(1);
ics.StartPreview(cbVideoPreviewSizes.SelectedIndex);
ics.StartConference(usersToInvite);
}
catch (Exception ex)
{
}
}
Once the call is made between two users I click on view other user video to see his Video stream
private void ViewUser_Click(object sender, RoutedEventArgs e)
{
if (UserName.Text == "user2")
ics.ViewUser("user1");
else
ics.ViewUser("user2");
}
Event to receive stream
private void ics_ViewUserResponseReceived(object sender, System.String userName, System.Int32 port,
System.Int32 videoWidth, System.Int32 videoHeight,
System.String videoCodec)
{
Dispatcher.BeginInvoke(new Action(delegate
{
icc.InitializeEngine(videoCodec, videoWidth, videoHeight);
icc.Call("localhost", port, videoWidth, videoHeight, "n/a", "","", 0, 0, 0, videoCodec);
}
));
}
Can anyone please guide me, and please also tell me how can I achieve this for more than one user. Any help will be appreciated.
You haven't missed anything in the code. The issue is that the video call uses different ports to the audio and it's being blocked by a firewall. I haven't looked into exactly which ports, but when I tried allowing any connections between my devices it worked as expected.