Closed azm3n closed 10 months ago
@Azm3n useRemoteUsers
hooks only return users data when :
I completely understand it. I haven't changed anything from mobile flow because when I was using agora-rtc-react < 2.0.0 it was working. When I decided to change versions I started using useRemoteUsers and even though the flow from mobile app hasn't changed it is not returning expected mobile user in React app. Are there any other ways to retrieve remote clients?
@Azm3n You can use useClientEvent
to retrieve remote clients by yourself.
eg:
const client = useRTCClient();
useClientEvent(client,'user-published',(user)=>{
console.log('user:',user)
})
@Azm3n I noticed you are trying to communicating with mobile app, is this mobile app are using our Agora RTC SDK? If yes, please check your two platform's uid is same data type.
It was all about uid. React app was sending string type and mobile app was sending number. Thank you!!
What kind of problem do you need help?
I use agora in a React web app and a Flutter mobile app. When I join a channel on the website and mobile app only on mobile, I can see and hear the customer from a different device. I tried to fix it and found that useRemoteUsers does not return any client. What could be the reasons for this behavior?
I am using agora-rtc-react version 2.1.0 and it is code for React that I was taking inspiration from https://codesandbox.io/p/sandbox/agora-rtc-react-quickstart-rdpc46