benwtrent / janus-gateway-android

This is an API wrapper that utilizes the native WebRTC build and is made to ease communication with the janus-gateway
MIT License
112 stars 73 forks source link

Issue with running sample videoroom #21

Closed kLkA closed 7 years ago

kLkA commented 7 years ago

Hey, im trying to run sample project with VideoRoom example

I replaced code in JanusActivity to use videoroom (instead echotest)

private VideoRenderer.Callbacks[] remoteRenderers = new VideoRenderer.Callbacks[1];

and

EGLContext con = VideoRendererGui.getEGLContext();
                videoRoomTest = new VideoRoomTest(localRender, remoteRenderers);
                videoRoomTest.initializeMediaContext(JanusActivity.this, true, true, true, con);
                videoRoomTest.Start();

ending log in android monitor is

09-28 18:00:42.295 14632-14683/computician.janusclient D/HelpersAndroid: Attaching thread to JVM@[tid=14683]
09-28 18:00:42.295 14632-14683/computician.janusclient D/WebRtcAudioRecord: EnableBuiltInAEC(true)
09-28 18:00:42.295 14632-14683/computician.janusclient D/HelpersAndroid: Detaching thread from JVM@[tid=14683]
09-28 18:00:42.295 14632-14668/computician.janusclient D/message: Sent: 
                                                                    {"janus":"message","transaction":"urXBIHfi5L0f","body":{"request":"join","room":1234,"ptype":"publisher","display":"android"}}
09-28 18:00:42.295 14632-14668/computician.janusclient D/libc: [NET] android_getaddrinfofornet+,hn 14(0x34362e3130312e),sn(),hints(known),family 0,flags 4
09-28 18:00:42.295 14632-14668/computician.janusclient D/libc: [NET] android_getaddrinfofornet-, SUCCESS
09-28 18:00:42.355 14632-14668/computician.janusclient D/message: Recv: 
                                                                    {"janus":"ack","session_id":1374146337289308,"transaction":"urXBIHfi5L0f"}

I dont know what it mean exactly and what state i have on android right now but Janus server showing this line in log

[ERR] [transports/janus_http.c:janus_http_handler:1214] Invalid session (null)
Creating new session: 1374146337289308
Creating new handle in session 1374146337289308: 5402687806442771
Timeout expired for session 1374146337289308...
Detaching handle from JANUS VideoRoom plugin
No WebRTC media anymore

Btw on echotest i see my local stream (video, without sound) but nothing related to remotestream.

Could you help me solve this problem? And also could you explain how to refactor code to use AudioBridge ( without video renderer at all maybe) ?

kLkA commented 7 years ago

Tried to use EchoTest. There are same errors and one more [ERR] [ice.c:janus_ice_cb_component_state_changed:1473] [8429594071000921] ICE failed for component 1 in stream 1... I've tried approach from #16 and added google's ICE server but it doesnt help

Tested on Android 5.0 (HTC One) and on Android 6.0 (LG Nexus 5)

MrsZ commented 7 years ago

Hi,i got the same issue with you . I changed code in echotest .

from: private final String JANUS_URI = "ws://****:8188";

to: private final String JANUS_URI = "http://****:8088/janus";

on echotest i see my local stream (video, without sound) but nothing related to remotestream. Could you help me solve this problem?

and I've added ICE server in echotest.java but it doesnt help.

Janus server show this line in log

[ERR] [transports/janus_http.c:janus_http_handler:1276] Invalid session (null) Creating new session: 4154678502045424 Creating new handle in session 4154678502045424: 5983132445792271 [5983132445792271] Creating ICE agent (ICE Full mode, controlled) [WARN] [5983132445792271] Hashing algorithm not the one we expected (sha-1 instead of sha-256), but that's ok [WARN] [5983132445792271] Hashing algorithm not the one we expected (sha-1 instead of sha-256), but that's ok [WARN] [5983132445792271] Still waiting for the DTLS stack for component 1 in stream 1... [ERR] [ice.c:janus_ice_cb_component_state_changed:1552] [5983132445792271] ICE failed for component 1 in stream 1... No WebRTC media anymore

and ,i use the same way to change VideoRoomTest.java. ws -.> http . on VideoRoomTest i do not see my local stream and remotestream. Thanks.