|
1 year ago | |
---|---|---|
.. | ||
android | 1 year ago | |
.npmignore | 2 years ago | |
.npmrc | 2 years ago | |
README.md | 1 year ago | |
index.tsx | 1 year ago | |
jitsi-meet-rnsdk.podspec | 2 years ago | |
package-lock.json | 2 years ago | |
package.json | 2 years ago | |
prepare_sdk.js | 1 year ago | |
sdk_instructions.js | 2 years ago | |
update_dependencies.js | 1 year ago |
Jitsi Meet React Native SDK
Inside your project, run;
npm i @jitsi/react-native-sdk
Additionally, if not already installed, some dependencies will need to be added.
This can be done by running the following script:
node node_modules/@jitsi/react-native-sdk/update_dependencies.js
This will check and update all your dependencies.
Because of SVG use in react native, you need to update metro.config your project’s file:
const { getDefaultConfig } = require('metro-config');
module.exports = (async () => {
const {
resolver: {
sourceExts,
assetExts
}
} = await getDefaultConfig();
return {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg']
}
}
})();
Run;
cd ios && pod install && cd ..
minSdkVersion = 24
android/app/src/debug/AndroidManifest.xml
and android/app/src/main/AndroidManifest.xml
, under the </application>
tag, include
xml
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
android/app/src/main/AndroidManifest.xml
, under the </application>
tag, include
xml
<service
android:name="org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService"
android:foregroundServiceType="mediaProjection" />
This will take care of the screen share feature.If you want to test all the steps before applying them to your app, you can check our React Native SDK sample app here: https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/react-native
javascript
<JitsiMeeting
room={'ThisIsNotATestRoomName'}
serverURL={'https://meet.jit.si/'}
token={'dkhalhfajhflahlfaahalhfahfsl'} />
For more details on how you can use React Native SDK with React Native app, you can follow this link: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-react-native-sdk