protected override void OnPause() { if (localVideoTrack != null) { /* * If this local video track is being shared in a Room, remove from local * participant before releasing the video track. Participants will be notified that * the track has been removed. */ if (localParticipant != null) { localParticipant.RemoveVideoTrack(localVideoTrack); } localVideoTrack.Release(); localVideoTrack = null; } base.OnPause(); }