public void DisconnectFromPeer()
    {
#if !UNITY_EDITOR
        if (decodedVideo != null)
        {
            decodedVideo.OnDecodedVideoFrame -= DecodedVideo_OnDecodedVideoFrame;
        }

        _webRtcControl.DisconnectFromPeer();
#endif
    }
Beispiel #2
0
 private void DisconnectPeerBtn_Click(object sender, RoutedEventArgs e)
 {
     RunOnUiThread(() =>
     {
         if (encodedVideo != null)
         {
             encodedVideo.OnEncodedVideoFrame -= EncodedVideo_OnEncodedVideoFrame;
         }
         _webRtcControl.DisconnectFromPeer();
     }
                   );
 }