@fishjam-cloud/react-native-client 0.18.1 → 0.19.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 +1 -1
- package/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +25 -15
- package/android/src/main/java/io/fishjam/reactnative/RNFishjamClientModule.kt +52 -0
- package/build/RNFishjamClientModule.d.ts +6 -1
- package/build/RNFishjamClientModule.d.ts.map +1 -1
- package/build/RNFishjamClientModule.js.map +1 -1
- package/build/components/FishjamRoom/index.d.ts +6 -0
- package/build/components/FishjamRoom/index.d.ts.map +1 -1
- package/build/components/FishjamRoom/index.js +6 -0
- package/build/components/FishjamRoom/index.js.map +1 -1
- package/build/components/LivestreamView.d.ts +33 -1
- package/build/components/LivestreamView.d.ts.map +1 -1
- package/build/components/LivestreamView.js +1 -1
- package/build/components/LivestreamView.js.map +1 -1
- package/build/components/VideoPreviewView.d.ts +1 -1
- package/build/components/VideoPreviewView.js +1 -0
- package/build/components/VideoPreviewView.js.map +1 -1
- package/build/components/VideoRendererView.d.ts +2 -2
- package/build/components/VideoRendererView.js +3 -2
- package/build/components/VideoRendererView.js.map +1 -1
- package/build/consts/index.d.ts +3 -0
- package/build/consts/index.d.ts.map +1 -0
- package/build/consts/index.js +4 -0
- package/build/consts/index.js.map +1 -0
- package/build/debug/stats/useRTCStatistics.js.map +1 -1
- package/build/hooks/useCamera.d.ts +5 -5
- package/build/hooks/useCamera.js.map +1 -1
- package/build/hooks/useConnection.d.ts +18 -7
- package/build/hooks/useConnection.d.ts.map +1 -1
- package/build/hooks/useConnection.js +10 -2
- package/build/hooks/useConnection.js.map +1 -1
- package/build/hooks/useMicrophone.d.ts +6 -2
- package/build/hooks/useMicrophone.d.ts.map +1 -1
- package/build/hooks/useMicrophone.js +12 -2
- package/build/hooks/useMicrophone.js.map +1 -1
- package/build/hooks/usePeers.js.map +1 -1
- package/build/hooks/usePermissions.d.ts +24 -0
- package/build/hooks/usePermissions.d.ts.map +1 -0
- package/build/hooks/usePermissions.js +61 -0
- package/build/hooks/usePermissions.js.map +1 -0
- package/build/hooks/useSandbox.d.ts +13 -0
- package/build/hooks/useSandbox.d.ts.map +1 -0
- package/build/hooks/useSandbox.js +42 -0
- package/build/hooks/useSandbox.js.map +1 -0
- package/build/hooks/useScreenShare.d.ts +1 -1
- package/build/hooks/useScreenShare.js.map +1 -1
- package/build/index.d.ts +5 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/types.d.ts +1 -0
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/ios/CameraPermissionsRequester.swift +117 -0
- package/ios/RNFishjamClient.swift +31 -20
- package/ios/RNFishjamClientModule.swift +176 -119
- package/package.json +16 -11
- package/plugin/build/types.d.ts +5 -0
- package/plugin/build/withFishjamAndroid.js +16 -4
- package/plugin/build/withFishjamIos.d.ts +1 -1
- package/plugin/build/withFishjamIos.js +106 -48
|
@@ -328,40 +328,51 @@ class RNFishjamClient: FishjamClientListener {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
func toggleMicrophone() async throws -> Bool {
|
|
331
|
-
if
|
|
332
|
-
|
|
331
|
+
if isMicrophoneOn {
|
|
332
|
+
try stopMicrophone()
|
|
333
333
|
} else {
|
|
334
|
-
|
|
334
|
+
try await startMicrophone()
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
try updateLocalAudioTrackMetadata(metadata: getMicrophoneTrackMetadata())
|
|
338
|
-
|
|
339
337
|
return isMicrophoneOn
|
|
340
338
|
}
|
|
341
339
|
|
|
342
340
|
func startMicrophone() async throws {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
341
|
+
// If microphone track already exist, just enable it
|
|
342
|
+
if let microphoneTrack = getLocalAudioTrack() {
|
|
343
|
+
try setMicrophoneTrackState(microphoneTrack, enabled: true)
|
|
344
|
+
} else {
|
|
345
|
+
guard await PermissionUtils.requestMicrophonePermission() else {
|
|
346
|
+
emit(event: .warning(message: "Microphone permission not granted."))
|
|
347
|
+
return
|
|
348
|
+
}
|
|
349
|
+
let microphoneTrack = RNFishjamClient.fishjamClient!.createAudioTrack(
|
|
350
|
+
metadata: getMicrophoneTrackMetadata(isEnabled: true).toMetadata())
|
|
351
|
+
setAudioSessionMode()
|
|
352
|
+
try setMicrophoneTrackState(microphoneTrack, enabled: true)
|
|
353
|
+
emitEndpoints()
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
func stopMicrophone() throws {
|
|
358
|
+
guard let microphoneTrack = getLocalAudioTrack() else {
|
|
359
|
+
return
|
|
360
|
+
}
|
|
361
|
+
try setMicrophoneTrackState(microphoneTrack, enabled: false)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
private func getMicrophoneTrackMetadata(isEnabled: Bool) -> [String: Any] {
|
|
355
365
|
return [
|
|
356
|
-
"active":
|
|
357
|
-
"paused": !
|
|
366
|
+
"active": isEnabled,
|
|
367
|
+
"paused": !isEnabled, //TODO: FCE-711
|
|
358
368
|
"type": "microphone",
|
|
359
369
|
]
|
|
360
370
|
}
|
|
361
371
|
|
|
362
|
-
private func setMicrophoneTrackState(_ microphoneTrack: LocalAudioTrack, enabled: Bool) {
|
|
372
|
+
private func setMicrophoneTrackState(_ microphoneTrack: LocalAudioTrack, enabled: Bool) throws {
|
|
363
373
|
microphoneTrack.enabled = enabled
|
|
364
374
|
isMicrophoneOn = enabled
|
|
375
|
+
try updateLocalAudioTrackMetadata(metadata: getMicrophoneTrackMetadata(isEnabled: enabled))
|
|
365
376
|
emit(event: .isMicrophoneOn(enabled: enabled))
|
|
366
377
|
}
|
|
367
378
|
|
|
@@ -63,159 +63,216 @@ struct ConnectConfig: Record {
|
|
|
63
63
|
typealias RNTrackBandwidthLimit = Either<Int, [String: Int]>
|
|
64
64
|
|
|
65
65
|
public class RNFishjamClientModule: Module {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
public func definition() -> ModuleDefinition {
|
|
67
|
+
let rnFishjamClient: RNFishjamClient = {
|
|
68
|
+
let client = RNFishjamClient(sendEvent)
|
|
69
|
+
client.create()
|
|
70
|
+
return client
|
|
71
|
+
}()
|
|
72
|
+
|
|
73
|
+
Name("RNFishjamClient")
|
|
74
|
+
|
|
75
|
+
Events(EmitableEvent.allEvents)
|
|
76
|
+
|
|
77
|
+
OnCreate {
|
|
78
|
+
let permissionsManager = self.appContext?.permissions
|
|
79
|
+
EXPermissionsMethodsDelegate.register(
|
|
80
|
+
[
|
|
81
|
+
CameraOnlyPermissionRequester(),
|
|
82
|
+
CameraMicrophonePermissionRequester()
|
|
83
|
+
],
|
|
84
|
+
withPermissionsManager: permissionsManager
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
Property("peerStatus") {
|
|
89
|
+
return rnFishjamClient.peerStatus.rawValue
|
|
90
|
+
}
|
|
72
91
|
|
|
73
|
-
|
|
92
|
+
Property("reconnectionStatus") {
|
|
93
|
+
return rnFishjamClient.reconnectionStatus.rawValue
|
|
94
|
+
}
|
|
74
95
|
|
|
75
|
-
|
|
96
|
+
Property("isMicrophoneOn") {
|
|
97
|
+
return rnFishjamClient.isMicrophoneOn
|
|
98
|
+
}
|
|
76
99
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
100
|
+
Property("isCameraOn") {
|
|
101
|
+
return rnFishjamClient.isCameraOn
|
|
102
|
+
}
|
|
80
103
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
104
|
+
Property("cameras") {
|
|
105
|
+
return rnFishjamClient.getCaptureDevices()
|
|
106
|
+
}
|
|
84
107
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
108
|
+
Property("currentCamera") {
|
|
109
|
+
return rnFishjamClient.currentCamera
|
|
110
|
+
}
|
|
88
111
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
112
|
+
Property("isScreenShareOn") {
|
|
113
|
+
return rnFishjamClient.isScreenShareOn
|
|
114
|
+
}
|
|
92
115
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
116
|
+
Property("isAppScreenShareOn") {
|
|
117
|
+
return rnFishjamClient.isAppScreenShareOn
|
|
118
|
+
}
|
|
96
119
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
120
|
+
Property("isCameraInitialized") {
|
|
121
|
+
return rnFishjamClient.isCameraInitialized
|
|
122
|
+
}
|
|
100
123
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
124
|
+
Function("getPeers") {
|
|
125
|
+
return rnFishjamClient.getPeers()
|
|
126
|
+
}
|
|
104
127
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
128
|
+
AsyncFunction("joinRoom") {
|
|
129
|
+
(
|
|
130
|
+
url: String, peerToken: String, peerMetadata: [String: Any], config: ConnectConfig,
|
|
131
|
+
promise: Promise
|
|
132
|
+
) in
|
|
133
|
+
rnFishjamClient.joinRoom(
|
|
134
|
+
url: url, peerToken: peerToken, peerMetadata: peerMetadata, config: config,
|
|
135
|
+
promise: promise)
|
|
136
|
+
}
|
|
108
137
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
138
|
+
AsyncFunction("leaveRoom") {
|
|
139
|
+
rnFishjamClient.leaveRoom()
|
|
140
|
+
}
|
|
112
141
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
142
|
+
AsyncFunction("startCamera") { (config: CameraConfig) in
|
|
143
|
+
try await rnFishjamClient.startCamera(config: config)
|
|
144
|
+
}
|
|
116
145
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
promise: promise)
|
|
125
|
-
}
|
|
146
|
+
AsyncFunction("toggleMicrophone") {
|
|
147
|
+
try await rnFishjamClient.toggleMicrophone()
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
AsyncFunction("startMicrophone") {
|
|
151
|
+
try await rnFishjamClient.startMicrophone()
|
|
152
|
+
}
|
|
126
153
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
154
|
+
AsyncFunction("stopMicrophone") {
|
|
155
|
+
try rnFishjamClient.stopMicrophone()
|
|
156
|
+
}
|
|
130
157
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
158
|
+
AsyncFunction("toggleCamera") {
|
|
159
|
+
try rnFishjamClient.toggleCamera()
|
|
160
|
+
}
|
|
134
161
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
162
|
+
AsyncFunction("flipCamera") {
|
|
163
|
+
try rnFishjamClient.flipCamera()
|
|
164
|
+
}
|
|
138
165
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
166
|
+
AsyncFunction("switchCamera") { (cameraId: String) in
|
|
167
|
+
try rnFishjamClient.switchCamera(cameraId: cameraId)
|
|
168
|
+
}
|
|
142
169
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
170
|
+
AsyncFunction("toggleScreenShare") { (screenShareOptions: ScreenShareOptions) in
|
|
171
|
+
try rnFishjamClient.toggleScreenShare(screenShareOptions: screenShareOptions)
|
|
172
|
+
}
|
|
146
173
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
174
|
+
AsyncFunction("toggleAppScreenShare") { (screenShareOptions: ScreenShareOptions) in
|
|
175
|
+
try rnFishjamClient.toggleAppScreenShare(screenShareOptions: screenShareOptions)
|
|
176
|
+
}
|
|
150
177
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
178
|
+
AsyncFunction("updatePeerMetadata") { (metadata: [String: Any]) in
|
|
179
|
+
try rnFishjamClient.updatePeerMetadata(metadata: metadata)
|
|
180
|
+
}
|
|
154
181
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
182
|
+
AsyncFunction("updateVideoTrackMetadata") { (metadata: [String: Any]) in
|
|
183
|
+
try rnFishjamClient.updateLocalVideoTrackMetadata(metadata: metadata)
|
|
184
|
+
}
|
|
158
185
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
186
|
+
AsyncFunction("updateScreenShareTrackMetadata") { (metadata: [String: Any]) in
|
|
187
|
+
try rnFishjamClient.updateLocalScreenShareTrackMetadata(metadata: metadata)
|
|
188
|
+
}
|
|
162
189
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
190
|
+
AsyncFunction("toggleScreenShareTrackEncoding") { (encoding: String) in
|
|
191
|
+
try rnFishjamClient.toggleScreenShareTrackEncoding(encoding: encoding)
|
|
192
|
+
}
|
|
166
193
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
194
|
+
AsyncFunction("setScreenShareTrackBandwidth") { (bandwidth: Int) in
|
|
195
|
+
try rnFishjamClient.setScreenShareTrackBandwidth(bandwidth: bandwidth)
|
|
196
|
+
}
|
|
170
197
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
198
|
+
AsyncFunction("setScreenShareTrackEncodingBandwidth") { (encoding: String, bandwidth: Int) in
|
|
199
|
+
try rnFishjamClient.setScreenShareTrackEncodingBandwidth(
|
|
200
|
+
encoding: encoding, bandwidth: bandwidth)
|
|
201
|
+
}
|
|
174
202
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
203
|
+
AsyncFunction("setTargetTrackEncoding") { (trackId: String, encoding: String) in
|
|
204
|
+
try rnFishjamClient.setTargetTrackEncoding(trackId: trackId, encoding: encoding)
|
|
205
|
+
}
|
|
178
206
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
207
|
+
AsyncFunction("toggleVideoTrackEncoding") { (encoding: String) in
|
|
208
|
+
try rnFishjamClient.toggleVideoTrackEncoding(encoding: encoding)
|
|
209
|
+
}
|
|
183
210
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
211
|
+
AsyncFunction("setVideoTrackEncodingBandwidth") { (encoding: String, bandwidth: Int) in
|
|
212
|
+
try rnFishjamClient.setVideoTrackEncodingBandwidth(
|
|
213
|
+
encoding: encoding, bandwidth: bandwidth)
|
|
214
|
+
}
|
|
187
215
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
216
|
+
AsyncFunction("setVideoTrackBandwidth") { (bandwidth: Int) in
|
|
217
|
+
try rnFishjamClient.setVideoTrackBandwidth(bandwidth: bandwidth)
|
|
218
|
+
}
|
|
191
219
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
220
|
+
AsyncFunction("changeWebRTCLoggingSeverity") { (severity: String) in
|
|
221
|
+
try rnFishjamClient.changeWebRTCLoggingSeverity(severity: severity)
|
|
222
|
+
}
|
|
196
223
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
224
|
+
AsyncFunction("getStatistics") {
|
|
225
|
+
try await rnFishjamClient.getStatistics()
|
|
226
|
+
}
|
|
200
227
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
228
|
+
AsyncFunction("selectAudioSessionMode") { (sessionMode: String) in
|
|
229
|
+
try rnFishjamClient.selectAudioSessionMode(sessionMode: sessionMode)
|
|
230
|
+
}
|
|
204
231
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
232
|
+
AsyncFunction("showAudioRoutePicker") {
|
|
233
|
+
rnFishjamClient.showAudioRoutePicker()
|
|
234
|
+
}
|
|
208
235
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
236
|
+
AsyncFunction("startAudioSwitcher") {
|
|
237
|
+
rnFishjamClient.startAudioSwitcher()
|
|
238
|
+
}
|
|
212
239
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
240
|
+
AsyncFunction("getCameraPermissionsAsync") { (promise: Promise) in
|
|
241
|
+
EXPermissionsMethodsDelegate.getPermissionWithPermissionsManager(
|
|
242
|
+
self.appContext?.permissions,
|
|
243
|
+
withRequester: CameraOnlyPermissionRequester.self,
|
|
244
|
+
resolve: promise.resolver,
|
|
245
|
+
reject: promise.legacyRejecter
|
|
246
|
+
)
|
|
247
|
+
}
|
|
216
248
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
249
|
+
AsyncFunction("requestCameraPermissionsAsync") { (promise: Promise) in
|
|
250
|
+
EXPermissionsMethodsDelegate.askForPermission(
|
|
251
|
+
withPermissionsManager: self.appContext?.permissions,
|
|
252
|
+
withRequester: CameraOnlyPermissionRequester.self,
|
|
253
|
+
resolve: promise.resolver,
|
|
254
|
+
reject: promise.legacyRejecter
|
|
255
|
+
)
|
|
220
256
|
}
|
|
221
|
-
|
|
257
|
+
|
|
258
|
+
AsyncFunction("getMicrophonePermissionsAsync") { (promise: Promise) in
|
|
259
|
+
EXPermissionsMethodsDelegate.getPermissionWithPermissionsManager(
|
|
260
|
+
self.appContext?.permissions,
|
|
261
|
+
withRequester: CameraMicrophonePermissionRequester.self,
|
|
262
|
+
resolve: promise.resolver,
|
|
263
|
+
reject: promise.legacyRejecter
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
AsyncFunction("requestMicrophonePermissionsAsync") { (promise: Promise) in
|
|
268
|
+
EXPermissionsMethodsDelegate.askForPermission(
|
|
269
|
+
withPermissionsManager: self.appContext?.permissions,
|
|
270
|
+
withRequester: CameraMicrophonePermissionRequester.self,
|
|
271
|
+
resolve: promise.resolver,
|
|
272
|
+
reject: promise.legacyRejecter
|
|
273
|
+
)
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/react-native-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "A React Native client for Fishjam",
|
|
5
5
|
"author": "Fishjam Team",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "EXPO_NONINTERACTIVE=1 sh -c 'expo-module build && expo-module build plugin'",
|
|
11
11
|
"clean": "expo-module clean",
|
|
12
|
-
"lint": "
|
|
13
|
-
"lint:
|
|
12
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
13
|
+
"lint:fix": "yarn lint --fix",
|
|
14
14
|
"test": "expo-module test",
|
|
15
15
|
"prepare": "expo-module prepare",
|
|
16
16
|
"prepublishOnly": "expo-module prepublishOnly",
|
|
@@ -42,26 +42,31 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"promise-fs": "^2.1.1",
|
|
44
44
|
"protobufjs": "^7.4.0",
|
|
45
|
-
"react-native-whip-whep": "0.2.
|
|
46
|
-
"zod": "^3.
|
|
45
|
+
"react-native-whip-whep": "0.2.3",
|
|
46
|
+
"zod": "^3.25.71"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@testing-library/dom": "^10.4.0",
|
|
50
50
|
"@testing-library/react": "^16.3.0",
|
|
51
|
-
"@types/lodash": "^4.17.
|
|
51
|
+
"@types/lodash": "^4.17.20",
|
|
52
52
|
"@types/promise-fs": "^2.1.2",
|
|
53
53
|
"@types/react": "~19.0.10",
|
|
54
54
|
"@types/react-dom": "^19",
|
|
55
|
-
"
|
|
55
|
+
"eslint": "^9.29.0",
|
|
56
|
+
"eslint-config-expo": "~9.2.0",
|
|
57
|
+
"eslint-config-prettier": "^10.1.5",
|
|
58
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
59
|
+
"expo-module-scripts": "^4.1.9",
|
|
56
60
|
"husky": "^9.1.7",
|
|
57
61
|
"jest": "^29.6.1",
|
|
58
62
|
"jest-environment-jsdom": "^29.6.1",
|
|
59
|
-
"jest-expo": "~53.0.
|
|
63
|
+
"jest-expo": "~53.0.9",
|
|
60
64
|
"jest-websocket-mock": "^2.4.0",
|
|
61
|
-
"pod-install": "^0.3.
|
|
65
|
+
"pod-install": "^0.3.9",
|
|
66
|
+
"prettier": "^3.6.2",
|
|
62
67
|
"react-dom": "19.0.0",
|
|
63
|
-
"ts-proto": "^2.7.
|
|
64
|
-
"typedoc": "^0.28.
|
|
68
|
+
"ts-proto": "^2.7.5",
|
|
69
|
+
"typedoc": "^0.28.7",
|
|
65
70
|
"typedoc-plugin-mark-react-functional-components": "^0.2.2",
|
|
66
71
|
"typescript": "~5.8.3"
|
|
67
72
|
},
|
package/plugin/build/types.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export type FishjamPluginOptions = {
|
|
2
2
|
android?: {
|
|
3
3
|
enableForegroundService?: boolean;
|
|
4
|
+
supportsPictureInPicture?: boolean;
|
|
4
5
|
};
|
|
5
6
|
ios?: {
|
|
6
7
|
iphoneDeploymentTarget?: string;
|
|
7
8
|
enableScreensharing?: boolean;
|
|
9
|
+
supportsPictureInPicture?: boolean;
|
|
10
|
+
appGroupContainerId?: string;
|
|
11
|
+
mainTargetName?: string;
|
|
12
|
+
broadcastExtensionTargetName?: string;
|
|
8
13
|
};
|
|
9
14
|
} | undefined;
|
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withFishjamAndroid = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
5
|
const Manifest_1 = require("@expo/config-plugins/build/android/Manifest");
|
|
6
|
-
const withFishjamForegroundService = (config) => (0, config_plugins_1.withAndroidManifest)(config, async (configuration) => {
|
|
6
|
+
const withFishjamForegroundService = (config, props) => (0, config_plugins_1.withAndroidManifest)(config, async (configuration) => {
|
|
7
|
+
if (!props?.android?.enableForegroundService) {
|
|
8
|
+
return configuration;
|
|
9
|
+
}
|
|
7
10
|
const mainApplication = (0, Manifest_1.getMainApplicationOrThrow)(configuration.modResults);
|
|
8
11
|
mainApplication.service = mainApplication.service || [];
|
|
9
12
|
const newService = {
|
|
@@ -22,10 +25,19 @@ const withFishjamForegroundService = (config) => (0, config_plugins_1.withAndroi
|
|
|
22
25
|
}
|
|
23
26
|
return configuration;
|
|
24
27
|
});
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
const withFishjamPictureInPicture = (config, props) => (0, config_plugins_1.withAndroidManifest)(config, (configuration) => {
|
|
29
|
+
const activity = config_plugins_1.AndroidConfig.Manifest.getMainActivityOrThrow(configuration.modResults);
|
|
30
|
+
if (props?.android?.supportsPictureInPicture) {
|
|
31
|
+
activity.$['android:supportsPictureInPicture'] = 'true';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
delete activity.$['android:supportsPictureInPicture'];
|
|
28
35
|
}
|
|
36
|
+
return configuration;
|
|
37
|
+
});
|
|
38
|
+
const withFishjamAndroid = (config, props) => {
|
|
39
|
+
config = withFishjamForegroundService(config, props);
|
|
40
|
+
config = withFishjamPictureInPicture(config, props);
|
|
29
41
|
return config;
|
|
30
42
|
};
|
|
31
43
|
exports.withFishjamAndroid = withFishjamAndroid;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
import { FishjamPluginOptions } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function getSbePodfileSnippet(props: FishjamPluginOptions): string;
|
|
4
4
|
/**
|
|
5
5
|
* Applies screen sharing plugin if enabled. In order for screensharing to work, we need to copy extension files to your iOS project.
|
|
6
6
|
* Allows for dynamically changing deploymentTarget.
|