Exemplo n.º 1
0
        public bool ReciveRemoteConnection(string machineId, SdpInfo remoteOfferInfo)
        {
            this.remoteMachine = MachineLogic.GetMachineById(machineId);
            this.InitlizeConnetion();
            var answerInfo = this.PeerConnection.SetRemoteDescription(remoteOfferInfo.sdp, remoteOfferInfo.type).Result;

            if (answerInfo == null)
            {
                this.showInfo("流媒体设备启动失败");
                return(false);
            }

            WebSocketClient.SendMessage(machineId, answerInfo, msgType.client_onCallee_CreateAnswer);
            return(true);
        }
Exemplo n.º 2
0
 public void ReciveRemoteConnection(string machineId, SdpInfo remoteOfferInfo)
 {
     if (this.CanConnect == true)
     {
         var newbeControlled = new RemoteBeingControlled();
         newbeControlled.onCloseEvent += BeControlled_onCloseEvent;
         newbeControlled.ReciveRemoteConnection(machineId, remoteOfferInfo);
         //*****************************************************
         Application.Current.MainWindow.Close();
         //******************************************************
         this.beControlleds.Add(newbeControlled);
         this.beConWindow      = new BeControllWindow(newbeControlled);
         this.closeNeedConfirm = true;
         this.beConWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
         this.beConWindow.Show();
         this.beConWindow.Closing += BeConWindow_Closing;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 主动连接对方成功,接受对方发来的answer
 /// </summary>
 /// <param name="mchineId"></param>
 /// <param name="offerinfo"></param>
 public void SetRemoteAnswer(string mchineId, SdpInfo remoteAnswer)
 {
     this.CurrentContext.SetRemoteAnswer(mchineId, remoteAnswer.sdp, remoteAnswer.type);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 主动连接对方成功,接受对方发来的answer
 /// </summary>
 /// <param name="mchineId"></param>
 /// <param name="offerinfo"></param>
 public void SetRemoteAnswer(string mchineId, SdpInfo remoteAnswer)
 {
     this.controllerWindow.SetRemoteAnswer(mchineId, remoteAnswer);
 }
Exemplo n.º 5
0
 private void onCreateAnswerSuccessEvent(object sender, SdpInfo e)
 {
 }