Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[EX-118] Make screensharing in Expo plugin optional #137

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ Add plugin to your `app.json` if it's not already added:
}
```

If you want to use screensharing feature, enable it like this:

```json
{
"expo": {
"name": "example",
...
"plugins": [
[
"@jellyfish-dev/react-native-membrane-webrtc",
{
"setUpScreensharing": true,
}
]
]
}
}
```

On bare workflow run `expo prebuild` to configure the app, then run `pod install`.
On development build `eas build` should take care of it.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"access": "public"
},
"dependencies": {
"phoenix": "^1.7.6"
"phoenix": "^1.7.6",
"promise-fs": "^2.1.1"
},
"devDependencies": {
"@testing-library/react": "^14.0.0",
Expand All @@ -59,7 +60,6 @@
"lint-staged": "^13.0.3",
"pod-install": "^0.1.0",
"prettier": "^2.0.5",
"promise-fs": "^2.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.1",
Expand Down
9 changes: 6 additions & 3 deletions plugin/src/withMembrane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type MembranePluginOptions = {
cameraPermission?: string;
microphonePermission?: string;
iPhoneDeploymentTarget?: string;
setUpScreensharing?: boolean;
} | void;

const withAppGroupPermissions: ConfigPlugin = (config) => {
Expand Down Expand Up @@ -279,9 +280,11 @@ const withMembraneIOS: ConfigPlugin<MembranePluginOptions> = (
props
) => {
withMediaPermissions(config, props);
withAppGroupPermissions(config);
withInfoPlistConstants(config);
withMembraneSBE(config, props);
if (props?.setUpScreensharing) {
withAppGroupPermissions(config);
withInfoPlistConstants(config);
withMembraneSBE(config, props);
}
withPodfileProperties(config, (config) => {
config.modResults['ios.deploymentTarget'] =
props?.iPhoneDeploymentTarget ?? IPHONEOS_DEPLOYMENT_TARGET;
Expand Down
Loading