@apirtc/expo-apirtc-options-plugin
v0.0.4
Published
Plugin Expo pour ajouter les features apiRTC dans une application React Native
Downloads
11
Maintainers
Readme
expo-apirtc-options-plugin
Plugin to add apiRTC features in React Native application using Expo. This plugin simplify the integration of following features :
- screenSharing for Android and iOS
Installation
npm install @apirtc/expo-apirtc-options-plugin
Usage in app.json
You need to declare the plugin in app.json file of your application :
module.exports = {
...
plugins: [
['@apirtc/expo-apirtc-options-plugin', {
enableMediaProjectionService: false,
appleTeamId: "YOUR_TEAM_ID"
}]
],
};Possible options :
| Parameter | Description | Default value | | --- | --- | --- | | enableMediaProjectionService | Can be used to deactivate screenSharing activation on Android | true | | appleTeamId | used to define appleTeamId in your application project and screensharing extension | "APPLE_TEAM_ID_NOT_SET" |
Example :
module.exports = {
...
plugins: [
['@apirtc/expo-apirtc-options-plugin', {
enableMediaProjectionService: false,
appleTeamId: "YOUR_TEAM_ID"
}]
],
};What does this plugin do ? :
On Android :
- Add needed permission in your app AndroidManifest file for screenSharing
- Manage the case where the application is killed by user when a screenShare is enabled : A native module AppLifecycleModule is added in your application to manage the case where the user kill the application using swipe. This module detect the onHostDestroy event to stop the screenSharing extension and unpublish stream.
On iOS :
- Add broadcast extension for screenSharing feature
- Configure project with needed modification for screenSharing feature
