awslabs / amazon-kinesis-video-streams-webrtc-sdk-android

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.
Apache License 2.0
58 stars 37 forks source link

Question: How to change front to rear camera after the call is initialised? #38

Closed JeetSA closed 3 years ago

JeetSA commented 3 years ago

There is an option in the app to choose if the front camera or the rear camera. I want to implement a way to flip the camera after the call is started.

Can anyone please suggest to me how I can achieve this?

Thanks in advance.

hassanctech commented 3 years ago

We're not supporting this right now. We would suggest just restarting the peer connection.

hassanctech commented 3 years ago

There is a replaceTrack method that can do this. You can modify the sample to use this instead I think this should address your use case: https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/replaceTrack

stephanbordera commented 3 years ago

Hi, I have upgraded to the latest iOS SDK via cocoa pod and there is no such method available, can you help ?

saberzakhama commented 3 years ago

Hello, I didn't found the replacetrack method on your Android sdk. Could you please upgrade your sdk with this feature. Thanks

sharadrj commented 3 years ago

replaceTrack should be in webrtc libraries on Andoird/iOS platforms. It is not part of the KVS SDK.