I was wondering if it’s possibile to create a client (or a web-client) that can connect two users and then it sends their webcam stream to each other.
This should happen without using Red5 or any other flash/media server.
What protocol can I use? What api etc…
I was wondering if it’s possibile to create a client (or a web-client) that
Share
As a super simple method, look at UDP tutorials:
http://msdn.microsoft.com/en-us/library/system.net.sockets.udpclient.aspx
If UDP ends up being a bit too unreliable (it does not guarantee the data will arrive where it is sent) you could also try TCP connections.
However, one of the biggest issues you’ll hit is trying to get through NAT. Most firewalls will block incoming data unless there is an established connection going out first. You can use UPnP to get around this but it will probably take a bit of code:
http://www.codeproject.com/KB/IP/upnpnattraversal.aspx
Hope this helps. With UDP you’re looking at just about 10 lines of code to send and receive data, with TCP is a bit more, but more reliable. Google both of those for more info.
From there it’s fairly simple. You get the data from the webcam. Save it to a MemoryStream (System.IO) as a .jpg. Then send that data via TCP or UDP.