MultiRtpOnlyAudio
Created by pedro on 30/5/21. Support multiple streams in rtmp and rtsp at same time. You must set the same number of ConnectChecker that you want use. For example. 2 RTMP and 1 RTSP: stream1, stream2, stream3 (stream1 and stream2 are ConnectCheckerRtmp. stream3 is ConnectCheckerRtsp) MultiRtpOnlyAudio multiRtpOnlyAudio = new MultiRtpOnlyAudio(new ConnectCheckerRtmp[]{ stream1, stream2 }, new ConnectCheckerRtsp[]{ stream3 }); You can set an empty array or null if you don't want use a protocol new MultiRtpOnlyAudio(new ConnectCheckerRtmp[]{ stream1, stream2 }, null); //RTSP protocol is not used In order to use start, stop and other calls you must send type of stream and index to execute it. Example (using previous example interfaces): multiRtpOnlyAudio.startStream(RtpType.RTMP, 1, myendpoint); //stream2 is started multiRtpOnlyAudio.stopStream(RtpType.RTSP, 0); //stream3 is stopped multiRtpOnlyAudio.retry(RtpType.RTMP, 0, delay, reason, backupUrl) //retry stream1 NOTE: If you call this methods nothing is executed: multiRtpOnlyAudio.startStream(endpoint); multiRtpOnlyAudio.stopStream(); multiRtpOnlyAudio.retry(delay, reason, backUpUrl); The rest of methods without RtpType and index means that you will execute that command in all streams. Read class code if you need info about any method.