Viv*_*tel 5 android ssl-certificate ios webrtc kurento
我在android应用程序中工作,我有流视频.我正在使用kurento媒体服务器进行流媒体播放. 我使用以下代码连接到KMS:
executor = new LooperExecutor();
executor.requestStart();
String wsRoomUri = "wss://192.168.0.104:8433/kurento";
kurentoRoomAPI = new KurentoRoomAPI(executor, wsRoomUri, this);
CertificateFactory cf;
try {
cf = CertificateFactory.getInstance("X.509");
InputStream caInput = new BufferedInputStream(getAssets().open("kurento_room_base64.cer"));
Certificate ca = cf.generateCertificate(caInput);
kurentoRoomAPI.addTrustedCertificate("ca", ca);
} catch (CertificateException |IOException e) {
e.printStackTrace();
}
kurentoRoomAPI.useSelfSignedCertificate(true);
kurentoRoomAPI.connectWebSocket();
Run Code Online (Sandbox Code Playgroud)
它连接起来了.但当我尝试加入房间时,它显示错误,错误是:
.vtt.nubotest E/MainActivity: Code:-32601
04-18 17:30:18.061 11699-11938/fi.vtt.nubotest E/MainActivity: Data:null
Run Code Online (Sandbox Code Playgroud)
我收到错误:
@Override
public void onRoomError(RoomError error) {
Toast.makeText(MainActivity.this,"OnError",Toast.LENGTH_SHORT).show();
Log.e(TAG,"Code:"+ error.getCode());
Log.e(TAG,"Data:"+ error.getData());
if(error.getCode() == 104) {
showFinishingError("Room error", "Username already taken");
}
}
Run Code Online (Sandbox Code Playgroud)
在服务器错误日志中,我可以在json格式中看到以下错误:
Response: >{"error":{"code":-32601,"message":"Method not
found."},"id":4,"jsonrpc":"2.0"}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
209 次 |
| 最近记录: |