AgoraIO-Community / ReactNative-UIKit-example

Example code implementing the React Native UIKit
3 stars 3 forks source link

only black screen visible with controllers #2

Open ishangupta-1510 opened 2 years ago

ishangupta-1510 commented 2 years ago

import React, {useState} from 'react'; import AgoraUIKit from 'agora-rn-uikit';

const App = () => { const [videoCall, setVideoCall] = useState(true); const rtcProps = { appId: '240bd9ad79ff48e69d0035d81704d7f0', channel: 'test', }; const callbacks = { EndCall: () => setVideoCall(false), }; return videoCall ? (

) : ( <></> ); };

export default App;

NikkiChristofi commented 2 years ago

@ishangupta-1510 we had the same problem and were able to solve it by adding a token to the rtcProps, so:

const rtcProps = { appId: 'your app id', channel: 'test', token: 'your token here' };

To generate the token, go to your project in the Agora console, click on "config" and there'll be an option to generate a temp RTC token:

Screenshot 2022-06-06 at 17 05 44

Copy the token and add it to rtcProps and you should see the camera show.

prakharjcis commented 1 year ago

I have added appId,channel & token.... but still facing the same issue (BlackScreen)