@@ -139,18 +139,35 @@ public RTSPClient(ILoggerFactory loggerFactory)
139139 }
140140
141141 /// <summary>
142- /// Connect .
142+ /// Connects to the specified RTSP server .
143143 /// </summary>
144144 /// <param name="url">URL to connect to.</param>
145145 /// <param name="rtpTransport">Type of the RTP transport <see cref="RTPTransport"/>.</param>
146146 /// <param name="username">User name.</param>
147147 /// <param name="password">Password.</param>
148148 /// <param name="mediaRequest">Media request type <see cref="MediaRequest>."/></param>
149149 /// <param name="playbackSession">Playback session.</param>
150+ /// <param name="userCertificateSelectionCallback">Callback for user certificate selection.</param>
150151 public void Connect ( string url , RTPTransport rtpTransport , string username = null , string password = null , MediaRequest mediaRequest = MediaRequest . VIDEO_AND_AUDIO , bool playbackSession = false , System . Net . Security . RemoteCertificateValidationCallback userCertificateSelectionCallback = null )
151152 {
152- _logger . LogDebug ( "Connecting to {url} " , url ) ;
153- _uri = new Uri ( url ) ;
153+ Connect ( new Uri ( url ) , rtpTransport , username , password , mediaRequest , playbackSession , userCertificateSelectionCallback ) ;
154+ }
155+
156+ /// <summary>
157+ /// Connects to the specified RTSP server.
158+ /// </summary>
159+ /// <param name="uri">The URI of the RTSP server.</param>
160+ /// <param name="rtpTransport">Type of the RTP transport <see cref="RTPTransport"/>.</param>
161+ /// <param name="username">User name.</param>
162+ /// <param name="password">Password.</param>
163+ /// <param name="mediaRequest">Media request type <see cref="MediaRequest>."/></param>
164+ /// <param name="playbackSession">Playback session.</param>
165+ /// <param name="userCertificateSelectionCallback">Callback for user certificate selection.</param>
166+ public void Connect ( Uri uri , RTPTransport rtpTransport , string username , string password , MediaRequest mediaRequest , bool playbackSession , System . Net . Security . RemoteCertificateValidationCallback userCertificateSelectionCallback )
167+ {
168+ _logger . LogDebug ( "Connecting to {url} " , uri ) ;
169+
170+ _uri = uri ;
154171
155172 _playbackSession = playbackSession ;
156173
0 commit comments