Comments (8)
If you're using the v4 of the uikit, you can use the rtcCallbacks
prop to add events example:
<AgoraUIKit
connectionData={{
appId: appid,
channel: 'test',
}}
rtcCallbacks={{
UserJoined: e => console.log(e)
}}
/>
On v3 of the uikit, this prop is called callbacks
from videouikit-reactnative.
If you're using the v4 of the uikit, you can use the
rtcCallbacks
prop to add events example:<AgoraUIKit connectionData={{ appId: appid, channel: 'test', }} rtcCallbacks={{ UserJoined: e => console.log(e) }} />On v3 of the uikit, this prop is called
callbacks
Basically I am Implementing Live Streaming by using agora-rn-uikit. But unfortunality, I am unable to see the no. of audience or users who are currently watching my live session.
Below is my code :-
const rtcProps = {
appId: APP_ID,
channel: item?.channel_name,
token: item?.rtc_token,
role: item?.isHost ? 1 : 2,
mode: 1
};
const callbacks = {
EndCall: () => {
setVideoCall(false);
navigation.goBack()
}
};
from videouikit-reactnative.
Update to the v4.0.0 of the UIKit and use the RTM callbacks to get audience count like so:
<AgoraUIKit
connectionData={{
appId: appid,
channel: 'test',
}}
rtmCallbacks={{
ChannelMemberJoined: (e) => {
//increment count
},
ChannelMemberLeft: (e) => {
//decrement count
},
}}
/>
RTM is only added in v4, so you'll have to update your code.
from videouikit-reactnative.
Update to the v4.0.0 of the UIKit and use the RTM callbacks to get audience count like so:
<AgoraUIKit connectionData={{ appId: appid, channel: 'test', }} rtmCallbacks={{ ChannelMemberJoined: (e) => { //increment count }, ChannelMemberLeft: (e) => { //decrement count }, }} />RTM is only added in v4, so you'll have to update your code.
Getting an error in RtmConfigure.tsx-- error file is attached and LOGIN_FAILURE error
And not getting any callback in rtmCallbacks
My code pic is also attached.
![Screenshot 2022-05-19 at 2 58 03 PM](https://user-images.githubusercontent.com/42267
565/169261261-2f547642-6c3b-4372-a0f6-862d1f8e2df9.png)
.
from videouikit-reactnative.
The connectionData prop expects rtcToken
, rtcUid
, rtmToken
, rtmUid
.
Can you double check these value?
from videouikit-reactnative.
The connectionData prop expects
rtcToken
,rtcUid
,rtmToken
,rtmUid
. Can you double check these value?
yes. I have checked everything.I did everything according to your way also.
My RTM working fine with Native IOS Sdk and web , But gives Login failed error in only agora-rn-uikit. Problem is only with RTM. Except this, all things are working fine rtc , rtcCallbacks, one to one video call, live streaming.
can you please recheck again ?
from videouikit-reactnative.
Are you using two different rtmUid
s and rtmToken
s for the two clients? I'm unable to reproduce the issue. Used a new project with the proper tokens and it works across web and react-native.
from videouikit-reactnative.
Hello,
one to one and one to many video call is working fine.When I set the settings for live streaming ( attached photo ) , then rtm gives an error related to LOGIN FAILURE.
you can check at your side with my agora credentials.
APP ID : ac48dd62bef64f23b8bc13e6e7f08e09
CERTIFICATE : 2d8691e4128e4731a7e7776a45ab3d0
4
from videouikit-reactnative.
Related Issues (20)
- dispatching actions twice onPress buttons HOT 1
- [Question] - How to move the minView container towards left or right in landscape mode when using pinned layout? HOT 1
- Support for react-native-agora 4.0.0 HOT 1
- Crash when tearing down AgoraUIKit component HOT 3
- Min view container (own camera preview) UI Issue HOT 2
- Screen Share HOT 3
- Other users cannot Join video stream with token gotten from agora-web-services such as Render & Railway. Only displaying a video screen. HOT 1
- Receiver User immediate offline after Join HOT 2
- How to show audio only when call gets started? HOT 1
- Quick start example not working react-native 0.7 HOT 4
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. HOT 4
- Error when ending call HOT 1
- layout is not changing. HOT 1
- How to make a voice call using Agora.io in react native? HOT 2
- Import EndCall, MuteAudio, MuteVideo functions HOT 2
- Customizing style HOT 2
- unable to start rtm CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN HOT 7
- onUserJoined callback not working? HOT 1
- RtmToken is not used in RtmConfigure.tsx file in LoginV2 function
- 'connection-state-change' as React UI Kit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videouikit-reactnative.