crossle / janus-gateway-android

Implements Janus gateway video room on Android
MIT License
63 stars 30 forks source link

How do I send a video?(video room) #3

Open dksush opened 5 years ago

dksush commented 5 years ago

Hi. It really helped me a lot. Thank you. Good connection to janus server, local screen is good. However, video transmission between devices is not possible. What parts should I touch? Thank you very much for your reply.


<connection to janus(two device)> Creating new session: 2731860959455720; 0x1c8e520 Creating new handle in session 2731860959455720: 8473885957692655; 0x1c8e520 0x1c75820 [8473885957692655] Creating ICE agent (ICE Full mode, controlled)

Creating new session: 6984670661975620; 0x1c75b40 Creating new handle in session 6984670661975620: 6294000228167432; 0x1c75b40 0x1c27940 [6294000228167432] Creating ICE agent (ICE Full mode, controlled)

PeerConnection.IceServer iceServer = new PeerConnection.IceServer("stun:stun.l.google.com:19302");

crossle commented 5 years ago

Because rtcConfig.iceTransportsType = PeerConnection.IceTransportsType.RELAY; so you must use a turn server

dksush commented 5 years ago

Quick reply Thank you very much. I needed to install a separate turn, not Google stun. "rtcConfig.iceTransportsType = PeerConnection.IceTransportsType.RELAY;". This part of me needs more study. Thank you very much.

dksush commented 5 years ago

Let me ask you one more thing. Thanks to this, the connection was successful. But sometimes failed. Could I get some advice on this? I would really appreciate your reply.


1)Creating new session: 8015714599678834; 0x23a04c0 Creating new handle in session 8015714599678834: 2268833976512079; 0x23a04c0 0x2387820 [2268833976512079] Creating ICE agent (ICE Full mode, controlled) [2268833976512079] The DTLS handshake has been completed [janus.plugin.videoroom-0x23a4cc0] WebRTC media is now available

2) Creating new session: 7108507105058876; 0x233c950 Creating new handle in session 7108507105058876: 7212357637035691; 0x233c950 0x2339e20 Creating new handle in session 7108507105058876: 1867104124551961; 0x233c950 0x2389300 [WARN] Subscriber is using the legacy 'listener' ptype [1867104124551961] Creating ICE agent (ICE Full mode, controlling) [7212357637035691] Creating ICE agent (ICE Full mode, controlled) [1867104124551961] The DTLS handshake has been completed [janus.plugin.videoroom-0x23a28d0] WebRTC media is now available

3) [WARN] [7212357637035691] ICE failed for component 1 in stream 1, but let's give it some time... (trickle pending, answer received, alert not set) [WARN] [7212357637035691] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)


1) Creating new session: 6055806914196441; 0x238d100 Creating new handle in session 6055806914196441: 5223496025139106; 0x238d100 0x2387820 [5223496025139106] Creating ICE agent (ICE Full mode, controlled) [5223496025139106] The DTLS handshake has been completed [janus.plugin.videoroom-0x233ac50] WebRTC media is now available

2) Creating new session: 6216879261134688; 0x23a0500 Creating new handle in session 6216879261134688: 4516477645487988; 0x23a0500 0x23a4fb0 Creating new handle in session 6216879261134688: 8873658060831140; 0x23a0500 0x23892b0 [WARN] Subscriber is using the legacy 'listener' ptype [8873658060831140] Creating ICE agent (ICE Full mode, controlling) [4516477645487988] Creating ICE agent (ICE Full mode, controlled) [4516477645487988] The DTLS handshake has been completed [janus.plugin.videoroom-0x233a870] WebRTC media is now available

3) Creating new handle in session 6055806914196441: 4147641466092414; 0x238d100 0x2339f70
[WARN] Subscriber is using the legacy 'listener' ptype [4147641466092414] Creating ICE agent (ICE Full mode, controlling) [8873658060831140] The DTLS handshake has been completed [janus.plugin.videoroom-0x23a2740] WebRTC media is now available [4147641466092414] The DTLS handshake has been completed [janus.plugin.videoroom-0x238ce90] WebRTC media is now available [WARN] Incoming RTCP SR SSRC (1707797228) does not match the expected one (0) video=1

crossle commented 5 years ago

ICE failed? your turn server have any errorl log?

dksush commented 5 years ago

There's an error like this. I'm sorry to bother you...


[ERR] [ice.c:janus_ice_check_failed:1615] [2811830955255823] ICE failed for component 1 in stream 1... [janus.plugin.videoroom-0x1ff44a0] No WebRTC media anymore; 0x1ff49c0 0x205b6a0 [2811830955255823] WebRTC resources freed; 0x1ff49c0 0x1ff79a0

// PeerConnection.IceServer iceServer = new PeerConnection.IceServer("turn:101.101.165.127:3478", "dksush", "1234");

llongoria commented 5 years ago

Quick reply Thank you very much. I needed to install a separate turn, not Google stun. "rtcConfig.iceTransportsType = PeerConnection.IceTransportsType.RELAY;". This part of me needs more study. Thank you very much.

Hi, I have the same problem is there any solution?

crossle commented 5 years ago

Or remove relay, use stun server