C# (CSharp) Byn.Unity.Examples Namespace

Classes

Name Description
MinimalCall This scenario uses two roles: a receiver and a sender. The receiver call object will switch into listening mode and wait for an incoming call. Once the receiver is fully set up a sender call object is created which then establishes a direct connection. Once the connection is established you should be able to hear your own voice being replayed by the speaker. Both receiver & sender use the ICall interface. This interface is the main interface of the library and was designed to allow creating one-on-one audio & video calls that work on all platforms with only minimal use platform specific code.It is also designed to be improved and maintained for a long time into the future while new features are being added thus as Conference calls. The connection will be established between STEP6 and STEP7. Here is what happens during that time: 1. The receiver is registered using a unique address on the signaling server 2. The sender is connecting to the signaling server and requests to be connected to the address used by the receiver 3. The signaling server will now connect them indirectly and forward messages between both 4. sender & receiver will exchange WebRTC specific messages containing details about if audio, video is used, what data channels are being establishes, the codecs being used and multiple IP addresses, port numbers and network protocols that might possibly allow the two to connect directly (or indirectly if TURN is available) 5. This step starts already in parallel with 4. Sender & receiver will now try to connect using the info exchanged. First it will try connections via LAN / WIFI. If this fails it will try to use STUN server to open the routers port and connect via internet. If this also fails it will try to use a TURN server to relay the data instead of using a direct connection. Note that this example doesn't set a stun / turn server. 6. Once a direct connection is established and all data, audio and video channels are ready the call object will report a CallAccepted event. 7. The Update method of the call objects have to keep getting called until the call ends. The call will keep checking the state of the connection and forward possible events that might be triggerd (e.g. CallEnded or updated video frames if video is active) 8. The signaling connections will be cut after a few seconds and the address can be reused before the call finishes. Please follow the comments in the example to learn more.