Closed jfbourne closed 8 months ago
@jfbourne change the Reproduce step 3 client to https://github.com/AgoraIO-Extensions/react-native-agora/tree/main/example , is that work on the demo?
@guoxianzhe after many hours of troubleshooting I narrowed down the issue to be related to joinChannelWithUserAccount
and the RtcTokenBuilder.buildTokenWithAccount
. Let me explain
It appears that it can successfully join the call as you can see below
However; it does not receive any audio if I join with joinChannelWithUserAccount
and a token generated by RtcTokenBuilder.buildTokenWithAccount
The only time it will receive audio is if I generate a token with RtcTokenBuilder.buildTokenWithUid
and join with joinChannel
This behavior is present in my app as well as the example app as you referenced above ONLY for audio (using live streaming) sent using Agora Web SDK 4.20.0 as a 'host' and the React Native Clients joining as listener audience.
@jfbourne If you use joinChannelWithUserAccount
, the Agora Web SDK 4.20.0 side should also use string uid too.
eg:
let client = AgoraRTC.createClient();
client.join(appid,channel,token,'12345') // '12345' is uid
@guoxianzhe Thanks.. just a few hours before your reply I came across a warning message here describing exactly what you said
Attention: To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
Thank you that solved my issue.
Describe the bug Unable to receive audio from WebSDK after upgrading to RN Agora v4.x
To Reproduce
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): WEB: Initializing AgoraRTC client v4.20.0 build: v4.20.0-0-g334e514b-dirty(12/8/2023, 3:48:29 PM), mode: live, codec: vp9 React Native: react-native-agora: 4.2.6
Smartphone (please complete the following information):
Additional context If the React Native Client is v3.x it it can receive audio from the Web Client SDK (v3.x and v4.x)l; however, after upgrading the RN Clients to v4.x, they are not able to receive audio from the Web Client SDK (v3x or v4.x). Communication between RN Clients (v3.x and v4.x) works.
NOTE: I only use the audio portion for "live" streaming to large audiences (10+ listeners)