|
@@ -48,6 +48,7 @@ public class JanusClient implements WebSocketChannel.WebSocketCallback {
|
|
|
|
|
|
public static final int ERROR_CREATE_ROOM = 0x01;
|
|
|
public static final int ERROR_ON_MESSAGE = 0x02;
|
|
|
+ public static final int ERROR_ON_CONNECT = 0x03;
|
|
|
|
|
|
public JanusClient(String janusUrl, BigInteger userId) {
|
|
|
this.janusUrl = janusUrl;
|
|
@@ -832,6 +833,13 @@ public class JanusClient implements WebSocketChannel.WebSocketCallback {
|
|
|
stopKeepAliveTimer();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onError(String err) {
|
|
|
+ if (janusCallback != null) {
|
|
|
+ janusCallback.onError(ERROR_ON_CONNECT, err);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public String randomString(int length) {
|
|
|
String str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
|
Random random = new Random();
|