Exemple #1
0
        /// <summary>
        /// we front the <see cref="IPeer"/> interface for the underlying peer so that UnityEvents
        /// and engine code have something they can bind to to trigger the actual calls
        /// </summary>
        #region IPeer

        public void AddDataChannel()
        {
            if (peer != null)
            {
                peer.AddDataChannel();
            }
        }
        public void MakeOffer()
        {
            //add data channel ( Replace with custom build of the API later)
            m_perUnderlyingNetworkPeer.AddDataChannel();

            m_dtmTimeOfLastIceCandidate = DateTime.UtcNow;
            m_perUnderlyingNetworkPeer.LocalSdpReadytoSend    -= OnOfferFinished;
            m_perUnderlyingNetworkPeer.LocalSdpReadytoSend    += OnOfferFinished;
            m_perUnderlyingNetworkPeer.IceCandiateReadytoSend -= OnOfferIceFinished;
            m_perUnderlyingNetworkPeer.IceCandiateReadytoSend += OnOfferIceFinished;
            m_perUnderlyingNetworkPeer.CreateOffer();
            m_webRtcObjectState = State.MakingOffer;
        }