Skip to content

Commit

Permalink
fix: require json path error
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Nov 17, 2020
1 parent bf37c05 commit efd3ef9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions example/agora.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"appId": YOUR_APP_ID,
"channelId": "APIExample",
"token": YOUR_TOEKN
"appId": YOUR_APP_ID,
"token": YOUR_TOEKN,
"channelId": YOUR_CHANNEL_ID,
"uid": YOUR_UID
}
9 changes: 7 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PermissionsAndroid, StyleSheet, Text, View } from 'react-native';
import AgoraRawdata from 'react-native-agora-rawdata';
import Agora, { RtcLocalView, RtcRemoteView } from 'react-native-agora';

const config = require('../../../agora.config.json');
const config = require('../agora.config.json');

export default function App() {
const [joined, setJoined] = React.useState<boolean>();
Expand All @@ -25,7 +25,12 @@ export default function App() {
await AgoraRawdata.registerVideoFrameObserver(
await agora.getNativeHandle()
);
await agora.joinChannel(config.token, config.channelId, undefined, 456);
await agora.joinChannel(
config.token,
config.channelId,
undefined,
config.uid
);
};

// eslint-disable-next-line jest/no-disabled-tests
Expand Down

0 comments on commit efd3ef9

Please sign in to comment.