connect method
set the url and mode
Implementation
@override
void connect({required String url, required PublisherProtocol mode}) {
/** Check if url is empty */
if (url == '') throw Exception('url is empty');
/** Check if url has right scheme */
if (mode == PublisherProtocol.RTMP && !url.contains('rtmp://')) {
throw Exception('Invalid url. Please use rtmp://');
} else if ((mode == PublisherProtocol.RTSP_TCP ||
mode == PublisherProtocol.RTSP_UDP) &&
!url.contains('rtsp://')) {
throw Exception('Invalid url. Please use rtsp://');
}
baseUrl = url;
this.mode = mode;
}