OpenVidu / openvidu-tutorials

OpenVidu tutorials to get started
http://openvidu.io/tutorials
Apache License 2.0
228 stars 251 forks source link

Android remove stream from remote connection #99

Closed rfazi closed 4 years ago

rfazi commented 4 years ago

Describe the bug The remote connection will not return the stream if I do not load my stream even if I add the constant offerToReceiveAudio and offerToReceiveVideo.

Expected behavior When I create remote connections I expect to receive the remote stream including audio and video even if I don't upload my audio and video including the offerToReceiveAudio and offerToReceiveVideo constants.

Wrong current behavior If I do not add my streams to the remote connection, the connection does not return the remote streams.

OpenVidu tutorial where to replicate the error Tutorial for Android: Session.java -> public void createRemotePeerConnection Comment out peerConnection.addStream or mediaStream.addTrack. CustomWebSocket.java -> private void subscribeAux Add

MediaConstraints sdpConstraints = new MediaConstraints();
sdpConstraints.mandatory.add(new MediaConstraints.KeyValuePair("offerToReceiveAudio", "true"));
sdpConstraints.mandatory.add(new MediaConstraints.KeyValuePair("offerToReceiveVideo", "true"));

and replace new MediaConstraints() for 'createOffer' method with sdpConstraints.

OpenVidu deployment info

Client device info (if applicable) Describe the client device(s) or platform(s) where you are able to replicate the error. For example:

rfazi commented 4 years ago

Any update about this?

micaelgallego commented 4 years ago

Are you using Android sample app? If this is the case, as you can see, there is no SDK. All involved code is included in the sample app. So you can tweak it whatever you want.

To create mobile apps we support ionic SDK and react native SDKs.

Native Android sample app is provided as is. Pull Requests are welcomed.

micaelgallego commented 4 years ago

I've moved the issue because is a problem in a tutorial

rfazi commented 4 years ago

OK, in the meantime I have fixed the issue. I will create a pull request when I have time. Thanks anyway.

micaelgallego commented 4 years ago

Cool!

rfazi commented 4 years ago

I've created a PR #100

micaelgallego commented 4 years ago

Thank you. We will take a look in the following days.