@fishjam-cloud/react-native-client 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,7 +48,7 @@ Add plugin to your `app.json` if it's not already added:
48
48
  }
49
49
  ```
50
50
 
51
- If you want to use screensharing feature, enable the following flag:
51
+ If you want to use screensharing feature, enable the following flags:
52
52
 
53
53
  ```json
54
54
  {
@@ -59,7 +59,12 @@ If you want to use screensharing feature, enable the following flag:
59
59
  [
60
60
  "@fishjam-cloud/react-native-client",
61
61
  {
62
- "setUpScreensharing": true,
62
+ "android": {
63
+ "enableForegroundService": true
64
+ },
65
+ "ios": {
66
+ "enableScreensharing": true
67
+ }
63
68
  }
64
69
  ]
65
70
  ]
@@ -72,11 +77,14 @@ On bare workflow run `expo prebuild` to configure the app, then run
72
77
 
73
78
  ### Android
74
79
 
75
- 1. Add camera and microphone permissions to your `AndroidManifest.xml`.
80
+ 1. Add camera and microphone permissions to your `AndroidManifest.xml` or you app.json permissions.
76
81
  2. Rebuild the app. That's it!
77
82
 
78
83
  ### iOS
79
84
 
85
+ > [!NOTE]
86
+ > If you're using our plugin with `enableScreensharing` set to `true`. Not further steps are required.
87
+
80
88
  On iOS installation is a bit more complicated, because you need to setup a
81
89
  screen broadcast app extension for screensharing.
82
90
 
@@ -102,7 +110,7 @@ screen broadcast app extension for screensharing.
102
110
  Broadcast Upload Extension → Next. Choose the name for the new target, select
103
111
  Swift language and deselect "Include UI Extension".
104
112
 
105
- ![New target config](../../.github/images/xcode1.png)
113
+ ![New target config](https://github.com/fishjam-cloud/mobile-client-sdk/blob/main/.github/images/xcode1.png)
106
114
 
107
115
  Press Finish. In the next alert xcode will ask you if you want to activate
108
116
  the new scheme - press Cancel.
@@ -110,7 +118,7 @@ screen broadcast app extension for screensharing.
110
118
  4. Configure app group. Go to "Signing & Capabilities" tab, click "+ Capability"
111
119
  button in upper left corner and select "App Groups".
112
120
 
113
- ![App groups config](../../.github/images/xcode2.png)
121
+ ![App groups config](https://github.com/fishjam-cloud/mobile-client-sdk/blob/main/.github/images/xcode2.png)
114
122
 
115
123
  Then in the "App Groups" add a new group or select existing. Usually group
116
124
  name has format `group.<your-bundle-identifier>`. Verify that both app and
@@ -119,7 +127,7 @@ screen broadcast app extension for screensharing.
119
127
  5. A new folder with app extension should appear on the left with contents like
120
128
  this:
121
129
 
122
- ![App extension files](../../.github/images/xcode3.png)
130
+ ![App extension files](https://github.com/fishjam-cloud/mobile-client-sdk/blob/main/.github/images/xcode3.png)
123
131
 
124
132
  Replace `SampleHandler.swift` with `MembraneBroadcastSampleHandler.swift` and
125
133
  this code:
@@ -221,10 +229,12 @@ room client. To run the app:
221
229
  instructions there to setup and run demo server.
222
230
  2. Clone the repo
223
231
  3. ```
224
- cd `examples/fishjam-chat`
225
232
  yarn
233
+ yarn build
234
+ cd `examples/fishjam-chat`
235
+ npx expo prebuild --clean
226
236
  ```
227
- 4. In App.ts replace server url with your server's url.
237
+ 4. Copy `.env.template` and create `.env` with proper secrets.
228
238
  5. `yarn run android` or `yarn run ios` or run project from Android Studio /
229
239
  Xcode just like every RN project. Note that simulators won't work, you have
230
240
  to test on real device for camera and screensharing to run.
@@ -323,6 +333,9 @@ Use track metadata to differentiate between video and screencast tracks.
323
333
 
324
334
  ### Android foreground service
325
335
 
336
+ > [!NOTE]
337
+ > If you're using our plugin with `enableForegroundService` set to `true`. Not further steps are required.
338
+
326
339
  In order for the call to continue running when app is in background, you need to
327
340
  set up and start a foreground service. You can use a 3rd party library for this,
328
341
  for example [notifee](https://notifee.app/).
@@ -2,8 +2,10 @@ apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
+ def packageVersion = '2.1'
6
+
5
7
  group = 'io.fishjam.reactnative'
6
- version = '0.2.0'
8
+ version = "${packageVersion}"
7
9
 
8
10
  buildscript {
9
11
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -59,7 +61,7 @@ android {
59
61
  minSdkVersion safeExtGet("minSdkVersion", 21)
60
62
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
61
63
  versionCode 1
62
- versionName "0.2.0"
64
+ versionName "${packageVersion}"
63
65
  }
64
66
  lintOptions {
65
67
  abortOnError false
@@ -82,7 +84,7 @@ dependencies {
82
84
  implementation project(':fishjam-cloud-android-client')
83
85
  } else {
84
86
  // update version number when releasing
85
- implementation 'com.github.fishjam-cloud:mobile-client-sdk:0.2.0'
87
+ implementation "com.github.fishjam-cloud:mobile-client-sdk:${packageVersion}"
86
88
  }
87
89
  api 'com.github.davidliu:audioswitch:8edf84ee46cdbc84c2b7725aa8f8d66363e19876'
88
90
  implementation 'androidx.appcompat:appcompat:1.6.1'
@@ -0,0 +1,17 @@
1
+ {
2
+ "platforms": ["ios", "android", "web"],
3
+ "ios": {
4
+ "modules": [
5
+ "RNFishjamClientModule",
6
+ "VideoPreviewViewModule",
7
+ "VideoRendererViewModule"
8
+ ]
9
+ },
10
+ "android": {
11
+ "modules": [
12
+ "io.fishjam.reactnative.RNFishjamClientModule",
13
+ "io.fishjam.reactnative.VideoPreviewViewModule",
14
+ "io.fishjam.reactnative.VideoRendererViewModule"
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,30 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'RNFishjamClient'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.description = package['description']
10
+ s.license = package['license']
11
+ s.author = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platform = :ios, '13.0'
14
+ s.swift_version = '5.4'
15
+ s.source = { git: 'https://github.com/fishjam-cloud/mobile-client-sdk/tree/main/packages/react-native-client/ios' }
16
+ s.static_framework = true
17
+
18
+ s.dependency 'ExpoModulesCore'
19
+
20
+ # Swift/Objective-C compatibility
21
+ s.pod_target_xcconfig = {
22
+ 'DEFINES_MODULE' => 'YES',
23
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule'
24
+ }
25
+
26
+ s.source_files = '**/*.{h,m,swift}'
27
+
28
+ s.dependency 'FishjamCloudClient', '>= 0.1'
29
+
30
+ end
@@ -97,7 +97,7 @@ public class RNFishjamClientModule: Module {
97
97
  return client
98
98
  }()
99
99
 
100
- AsyncFunction("connect") {
100
+ AsyncFunction("joinRoom") {
101
101
  (
102
102
  url: String, participantToken: String, participantMetadata: [String: Any], config: ConnectConfig,
103
103
  promise: Promise
@@ -136,7 +136,7 @@ public class RNFishjamClientModule: Module {
136
136
  }
137
137
 
138
138
  AsyncFunction("switchCamera") { (cameraId: String) in
139
- try rnFishjamClient.switchCamera(captureDeviceId: cameraId)
139
+ try rnFishjamClient.switchCamera(cameraId: cameraId)
140
140
  }
141
141
 
142
142
  Property("cameras") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishjam-cloud/react-native-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A React Native client for Fishjam Cloud",
5
5
  "author": "Fishjam Cloud Team",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "bugs": {
32
32
  "url": "https://github.com/fishjam-cloud/mobile-client-sdk/issues"
33
33
  },
34
- "homepage": "https://github.com/fishjam-cloud/mobile-client-sdk#readme",
34
+ "homepage": "https://fishjam.io",
35
35
  "publishConfig": {
36
36
  "registry": "https://registry.npmjs.org/",
37
37
  "access": "public"
@@ -79,11 +79,14 @@
79
79
  },
80
80
  "files": [
81
81
  "build/",
82
- "ios/*.swift",
83
- "android/src",
84
82
  "android/build.gradle",
85
- "plugin/build",
83
+ "android/src/",
84
+ "ios/*.swift",
85
+ "ios/RNFishjamClient.podspec",
86
+ "plugin/build/",
86
87
  "app.plugin.js",
87
- "README.md"
88
+ "expo-module.config.json",
89
+ "README.md",
90
+ "!**/node_modules"
88
91
  ]
89
92
  }