AndroidRTC icon indicating copy to clipboard operation
AndroidRTC copied to clipboard

onAddRemoteStream ,onRemoveRemoteStream not called

Open hungtm288 opened this issue 9 years ago • 30 comments

great app but i get problem with build video call application.

onAddRemoteStream ,onRemoveRemoteStream not called, "Connecting..." still visible.

i geted source code from : https://github.com/GleasonK/AndroidRTC/tree/master/app/src/main/java/me/kevingleason/androidrtc

can you help me to resolve?

hungtm288 avatar Feb 17 '16 11:02 hungtm288

no one answer me :(

hungtm288 avatar Mar 11 '16 06:03 hungtm288

Sorry, had miterms then a vacation. Haven't had much time to look into it.

Another user reported that if they hit send twice from the web service it changed from connecting to connected which makes me think there is some disjoint between signaling and changing activities in the Android app. Perhaps keeping the video chat as a fragment and showing it when the call is being set up would fix this. Otherwise I might have to send an extra PubNub signal once both phones have confirmed that they are in the correct activity.

Just ideas, I will try them out when I find time.

GleasonK avatar Mar 11 '16 10:03 GleasonK

GleasonK Thank you for your great job!

hi hungtm288 , I am little happy that i am not alone with that bug. (after 2 hours of headache) Something interesting when I trying to connect from Android to Web (tried with that example - https://kevingleason.me/AndroidRTC/) most of the times it's working.

But when trying from Android to Android it's not working at all. :( and when try to debug the onAddRemoteStream method not called, I hope GleasonK can shed light

Br, Dvir.

BDvirus avatar Mar 12 '16 19:03 BDvirus

GleasonK please help us...

BDvirus avatar Mar 20 '16 02:03 BDvirus

Thank you for your great job @GleasonK!

This kind of demo is very rare and i think many people need it so please help me with that bug, I have the same problem as above

Thank you very much

minhdl avatar Mar 28 '16 08:03 minhdl

@GleasonK please help me with this bug, or can you give me a more specific instruction

minhdl93 avatar Mar 28 '16 08:03 minhdl93

i am also facing this bug please @GleasonK help me

shakil807 avatar Mar 29 '16 16:03 shakil807

@GleasonK Please help! I am also facing the same issue. Neither working for Web to Android nor for Android to Android. onAddRemoteStream() method is not getting called. onConnected() method is getting called though.

dekaustubh avatar Mar 30 '16 11:03 dekaustubh

Bump, since I have also been stuck at this part.

alicanhaman avatar Apr 01 '16 13:04 alicanhaman

I go through it, everything is working perfect but unable to get video streaming of opposite person. it means problem with onAddRemoteStream(). I am not able to understand that why its happening ?

shaktisinh avatar Apr 19 '16 06:04 shaktisinh

Same problem here. On an Android to Android connection the remote video is not appearing. Only the local source. That happens on almost every connection, but around 1 out of 10 is working fine. Can't fine the reason.....:(

toabm avatar Apr 22 '16 19:04 toabm

Could you answer me a question: All of us is using Gradle integration to use the PubNub repositories? I am using:

// Pristine's WebRTC library compile 'io.pristine:libjingle:9694@aar' // PubNub Android WebRTC Signaling API compile 'me.kevingleason:pnwebrtc:1.0.6@aar' // Pubnub Android SDK (optional) compile 'com.pubnub:pubnub-android:3.7.4'

toabm avatar Apr 22 '16 19:04 toabm

Hi guys, I've been waiting too long for GleasonK's response and after nearly one month of researching, I have created a video call and chat demo, so if you are interested please visit my project page.

The server side: https://github.com/DangLienMinh/webrtc_server

The client side: https://github.com/DangLienMinh/webrtc_client

minhdl93 avatar Apr 28 '16 03:04 minhdl93

@DangLienMinh can u please tell me why u remove the process explicitly in onDestory method of RtcActivity. ???

shakil807g avatar May 01 '16 13:05 shakil807g

I also have same problem when video call. only local video is shown at device, not from another device. And found out that "onAddRemoteStream" was not called. Please help us

boymustafa avatar May 03 '16 08:05 boymustafa

@shakil807g you can refer to this issue in https://github.com/pchab/AndroidRTC/issues/42

minhdl93 avatar May 04 '16 00:05 minhdl93

Hi, Anybody find a solution to this?

melvinjlobo avatar Jun 08 '16 20:06 melvinjlobo

Has anyone found an answer to this yet? I don't wanna give up on this just yet, despite it's consumed a tremendous amount of time of mine...

XioZ avatar Sep 11 '16 09:09 XioZ

Problem fixed when I uploaded the APIs to new released version. Now Videocalling is working in a quite acceptable way.....:)

toabm avatar Sep 11 '16 15:09 toabm

Can u please explain more in detail what API version u have upgraded @toabm

shakil807g avatar Sep 12 '16 11:09 shakil807g

i'm facing the same problem. onAddRemoteStream method was only called after i rotated the screen.

jintoga avatar Sep 14 '16 09:09 jintoga

@toabm which of the API's are you talking about? Are they related to one of these libraries? me.kevingleason:pnwebrtc:1.0.6@aar io.pristine:libjingle:9694@aar OR com.pubnub:pubnub-android:3.7.4 I know that the last one was upgraded, as announced here

rafaelanastacioalves avatar Sep 17 '16 02:09 rafaelanastacioalves

Any definite solution to this issue?

NovumInceptum avatar Jan 04 '17 11:01 NovumInceptum

I have fixed the issue. It was little tricky. If you see the log, it will show you that the application always execute createOffer method. So both client A and client B will send an offer in same time. You can fix that issue by giving some condition so if the client A give an offer, and the client B will response by give an answer.

To see if any error occurs you can use method onCreateFailure(String s) and onSetFailure(String s) in PnPeer.java. Hope this will help.

newbie007fx avatar Feb 04 '17 13:02 newbie007fx

@newbie007fx could you give us your fixed code ? Thank u btw :)

mkmlh avatar Mar 14 '17 09:03 mkmlh

Also having this problem. To expand on @newbie007fx answer, seeing this from the log:

I/PnPeer: ON SET FAILURE - Failed to set remote offer sdp: Called in wrong state: STATE_SENTINITIATE I/PnPeer: ONCREATE FAILURE - CreateAnswer can't be called before SetRemoteDescription.

km147 avatar Apr 13 '17 08:04 km147

Thank you @km147, maybe someone have already some enlightenment for this problem?

mkmlh avatar Apr 15 '17 09:04 mkmlh

hope this will help https://github.com/newbie007fx/newwebrtc

newbie007fx avatar Apr 15 '17 14:04 newbie007fx

@newbie007fx thank a lot dude, i'll try it Terima kasih banyak sob 👍

mkmlh avatar Apr 15 '17 14:04 mkmlh

guys i've checked @newbie007fx latest post in PnPeerConnectionClient, he put if case called "dialed" in line 99, it works like a charm, thanks to him.

mkmlh avatar Apr 15 '17 16:04 mkmlh