Protocol TLSv1.1 is not supported
I am using your library to stream live on facebook. But getting following error. A few weeks ago it worked perfectly, reently I am getting this error.
Error: "Error configure stream, protocol TLSv1.1 is not supported"
When I start streaming through RTPService, it immadiately call the function onConnectionFailed:
override fun onConnectionFailed(reason: String) { if (camera2Base?.streamClient!!.reTry(5000, reason, null)) { showNotification("Connection end, will terminate or reconnect") } else { camera2Base?.stopStream() } }
And the reason is: Error configure stream, protocol TLSv1.1 is not supported.
Can you please explain why is this occuring and how to solve it?
Hello,
Did you updated the library? In that case, can you tell me the previous version used?
The library version I used is 2.4.6
Is the problem after update to version 2.6.4? Did you tried use JAVA sockets?
genericStream.getStreamClient().setSocketType(SocketType.JAVA)
I am using this version for last few months. After implementing this version live streaming was going well. And I did not use any socket separately.
Did you change java version of your project? I detected an error creating java socket that depend of your java version (affect to java 17+), using java 11 or less, the problem is fixed without change the code.
I did a fix for it here: https://github.com/pedroSG94/RootEncoder/commit/faf64a6b5c1b9fc40289a32577073b6ca41d2f98
My java version is 17. I have removed "TLSv1.1" from enableTLSOnSocket() function in TLSSocketFactory?
private fun enableTLSOnSocket(socket: Socket): Socket { if (socket is SSLSocket) { // socket.enabledProtocols = arrayOf("TLSv1.1", "TLSv1.2") socket.enabledProtocols = arrayOf("TLSv1.2") } return socket }
Now its working fine. Should I make any other changes?
That is enough, you can even remove that line like I did in the commit and then java will use any protocol available for TLS without the crash