Beispiel #1
0
 public SignalerViewModel(NodeDssSignaler signaler)
 {
     Signaler               = signaler;
     Signaler.OnConnect    += OnConnect;
     Signaler.OnDisconnect += OnDisconnect;
     Signaler.OnFailure    += OnFailure;
 }
        private void OnIceCandidateReadyToSend(string candidate, int sdpMlineindex, string sdpMid)
        {
            var message = new NodeDssSignaler.Message
            {
                MessageType      = NodeDssSignaler.Message.WireMessageType.Ice,
                Data             = $"{candidate}|{sdpMlineindex}|{sdpMid}", // see DssSignaler_OnMessage
                IceDataSeparator = "|"
            };

            NodeDssSignaler.SendMessageAsync(message);
        }
Beispiel #3
0
        private void OnLocalSdpReadyToSend(SdpMessage message)
        {
            Logger.Log($"Local {message.Type} ready to be sent to remote peer.");
            if (message.Type == SdpMessageType.Offer)
            {
                NotifyLocalOfferApplied();
            }
            if (message.Type == SdpMessageType.Answer)
            {
                NotifyLocalAnswerApplied();
            }
            var dssMessage = NodeDssSignaler.Message.FromSdpMessage(message);

            NodeDssSignaler.SendMessageAsync(dssMessage);
            //RunOnMainThread(() => negotiationStatusText.Text = (type == "offer" ? "Sending local offer" : "Idle (answer sent)"));
        }
        private void OnLocalSdpReadyToSend(string type, string sdp)
        {
            Logger.Log($"Local {type} ready to be sent to remote peer.");
            if (type == "offer")
            {
                NotifyLocalOfferApplied();
            }
            else if (type == "answer")
            {
                NotifyLocalAnswerApplied();
            }
            var message = new NodeDssSignaler.Message
            {
                MessageType      = NodeDssSignaler.Message.WireMessageTypeFromString(type),
                Data             = sdp,
                IceDataSeparator = "|"
            };

            NodeDssSignaler.SendMessageAsync(message);
            //RunOnMainThread(() => negotiationStatusText.Text = (type == "offer" ? "Sending local offer" : "Idle (answer sent)"));
        }
Beispiel #5
0
        private void OnIceCandidateReadyToSend(IceCandidate candidate)
        {
            var message = NodeDssSignaler.Message.FromIceCandidate(candidate);

            NodeDssSignaler.SendMessageAsync(message);
        }