void UpdateTrackRenderer(TwilioVideo.VideoTrack videoTrack, TwilioVideo.VideoView renderer)
 {
     if (videoTrack != null && !IsDestroyed && !IsFinishing)
     {
         videoTrack.AddRenderer(renderer);
     }
     renderer.Visibility = videoTrack == null ? ViewStates.Invisible : ViewStates.Visible;
 }
Exemple #2
0
 public void RemoveRemoteVideoTrack(TwilioVideo.VideoTrack track)
 {
     try
     {
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Exemple #3
0
 public void RemoveRemoteVideoTrack(TwilioVideo.VideoTrack track)
 {
     try
     {
         MainUserViewProfile.Visibility = ViewStates.Visible;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
        public void SetRemoteVideoTrack(TwilioVideo.VideoTrack videoTrack)
        {
            var trackId = videoTrack?.Name;

            if (_remoteVideoTrackId == trackId)
            {
                return;
            }
            _remoteVideoTrackId = trackId;
            UpdateTrackRenderer(videoTrack, _primaryVideo);
            _spinner.Visibility = _remoteVideoTrackId == null ? ViewStates.Visible : ViewStates.Invisible;
        }
 private void DropRenderings(VideoTrack track)
 {
     try
     {
         if (track?.Sinks?.Any() == true)
         {
             foreach (var r in track.Sinks.ToArray())
             {
                 track.RemoveSink(r);
             }
         }
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
Exemple #6
0
        public void SetRemoteVideoTrack(TwilioVideo.VideoTrack videoTrack)
        {
            var trackId = videoTrack?.TrackId;

            if (_remoteVideoTrackId == trackId)
            {
                return;
            }

            _remoteVideoTrackId = trackId;
            if (UserVideoTrack == null)
            {
                UserVideoTrack = videoTrack;


                UserVideoTrack.AddRenderer(_UserprimaryVideo);

                _thumbnailVideo.Visibility = LocalvideoTrack == null ? ViewStates.Invisible : ViewStates.Visible;
            }
        }
Exemple #7
0
        public void SetRemoteVideoTrack(TwilioVideo.VideoTrack videoTrack)
        {
            try
            {
                var trackId = videoTrack?.TrackId;

                if (_remoteVideoTrackId == trackId)
                {
                    return;
                }

                _remoteVideoTrackId = trackId;
                if (UserVideoTrack == null)
                {
                    UserVideoTrack = videoTrack;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
 public void RemoveRemoteVideoTrack(TwilioVideo.VideoTrack track)
 {
     SetRemoteVideoTrack(null);
 }