0

I have implemented the agora in my react native application by following the library documentation and also referred to this link.

I am able to see remote user video and local video in the application when it is running in the foreground state.

The main issue I am facing is when the iOS application is not running state. When I took the call in not running state, I can view my local preview but the remote user video is not visible in the app. But the remote user can see my preview, which means the channel was established successfully.

I tried setting fixed width and height to

RtcRemoteView.SurfaceView

but no change in result.

I am not able to figure out what I am doing wrong. So please help me to find a solution here. Thank you !!

React Native: 0.62.2

Agora: 3.5.1

MCoder
  • 3
  • 1

2 Answers2

0

I would recommend using the Agora UIKit for React Native, it will take care of a lot of the work for you. The repo you've linked to hasn't been updated in almost a year now.

The UIKits are across 6 platforms, and updated all the time.

Max

maxxfrazer
  • 1,173
  • 6
  • 15
  • Thank you @maxxfrazer!! Agora UIKit works fine and solved the issue I am facing. – MCoder Jan 27 '22 at 19:09
  • Can you suggest the best method to handle custom actions? I can see **switchCamera** method in callback but it is not directly switching device camera. My current implementation is creating a RtcEngine instance and using this I am able enableAudio, switchCamera, etc can be done. Is this the correct way of doing it? I couldn't find much in the Agora UIKit documentation about this. – MCoder Jan 27 '22 at 19:23
  • Are you saying that the builtin switchCamera method isn't working, or your own button/action isn't switching it? You should be able to refer to the engine instance that the UIKit is using, but I'll check with our React Native expert (and author of that repo). There's a more detailed blog on the UIKit too: https://www.agora.io/en/creating-a-react-native-video-chat-app-in-a-few-lines-of-code-using-agora-uikit/ – maxxfrazer Jan 28 '22 at 09:25
0

The mirror mode is by default enabled when using the front camera and disabled in the rear camera. If you want to enable the mirror mode on the local device, please update the _renderVideo as following (highlighted part)

please use mirrorMode={VideoMirrorMode.Enabled} in RtcLocalView.SurfaceView

Please let me know if this helps or not.