예제 #1
0
 void OnDisable()
 {
     if (this.m_signaling != null)
     {
         this.m_signaling.Stop();
         this.m_signaling = null;
     }
 }
예제 #2
0
        void OnEnable()
        {
            if (this.m_signaling == null)
            {
                this.m_signaling = new AyameSignaling(urlSignaling, signalingKey, roomId, interval);

                this.m_signaling.OnAccept       += OnAccept;
                this.m_signaling.OnAnswer       += OnAnswer;
                this.m_signaling.OnOffer        += OnOffer;
                this.m_signaling.OnIceCandidate += OnIceCandidate;
            }
            this.m_signaling.Start();
        }
예제 #3
0
        void OnAccept(AyameSignaling ayameSignaling)
        {
            AcceptMessage acceptMessage = ayameSignaling.m_acceptMessage;

            bool shouldSendOffer = acceptMessage.isExistClient;

            var configuration = GetSelectedSdpSemantics();

            this.iceServers   = configuration.iceServers;
            m_conf.iceServers = this.iceServers;

            // wait Offer
            if (!shouldSendOffer)
            {
                return;
            }

            // TODO: Send Offer
        }