Closed MinChanSike closed 7 years ago
It's can solve by adding MediaOptions :rtsp-tcp
at playMRL method.
public void playMRL(String mrl) {
// index=-1 will return options from libvlc instance without relying on MediaList
String[] options = mMediaList.getMediaOptions(-1);
options = AppendArrayItem(options, ":rtsp-tcp"); //<- Add code
mInternalMediaPlayerIndex = 0;
playMRL(mLibVlcInstance, mrl, options);
}
public static <T> T[] AppendArrayItem(T[] arr, T element) {
final int N = arr.length;
arr = Arrays.copyOf(arr, N + 1);
arr[N] = element;
return arr;
}
How to switch RTP/RTSP streaming from UDP to TCP as default? Android client support UDP as default, How to force for TCP based connection over the RTSP port. Want to change RTP over RTSP.