Byn.Unity.Examples.MinimalCall.Start C# (CSharp) Method

Start() private method

private Start ( ) : void
return void
        void Start()
        {
            //STEP1: set up our member variables

            //first access to this will boot up the library and create a UnityCallFactory
            //game object which will manage everything in the background.
            if (UnityCallFactory.Instance == null)
            {
                //if it is null something went terribly wrong
                Debug.LogError("UnityCallFactory missing. Platform not supported / dll's missing?");
                return;
            }

            //Use this address to connect. Watch out: you use a generic name 
            //and someone else starts the app using the same name you might end up connecting to
            //someone else!
            address = Application.productName + "_MinimalCall";

            //Set signaling server url. This server is used to reserve the address, to find the 
            //other call object, to exchange connection information (ip, port + webrtc specific info)
            //which are then used later to create a direct connection.
            //"callapp" corresponds to a specific configuration on the server side
            //and also acts as a pool of possible users with addresses we can connect to. 
            netConf = new NetworkConfig();
            //e.g.: "ws://signaling.because-why-not.com/test"
            netConf.SignalingUrl = ExampleGlobals.Signaling;

            //possible stun / turn servers. not needed for local test. only for online connections
            //netConf.IceServers.Add(new IceServer("stun.l.google.com:19302"));
            SetupReceiver();
        }