Giter Site home page Giter Site logo

Comments (8)

EkaanshArora avatar EkaanshArora commented on August 19, 2024

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.

honey10597 avatar honey10597 commented on August 19, 2024

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.

EkaanshArora avatar EkaanshArora commented on August 19, 2024

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.

honey10597 avatar honey10597 commented on August 19, 2024

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
Screenshot 2022-05-19 at 3 02 21 PM
565/169261261-2f547642-6c3b-4372-a0f6-862d1f8e2df9.png)
.

from videouikit-reactnative.

EkaanshArora avatar EkaanshArora commented on August 19, 2024

The connectionData prop expects rtcToken, rtcUid, rtmToken, rtmUid.
Can you double check these value?

from videouikit-reactnative.

honey10597 avatar honey10597 commented on August 19, 2024

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.

EkaanshArora avatar EkaanshArora commented on August 19, 2024

Are you using two different rtmUids and rtmTokens 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.

honey10597 avatar honey10597 commented on August 19, 2024

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
Screenshot 2022-05-20 at 5 40 02 PM
4

from videouikit-reactnative.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.