@fishjam-cloud/react-native-client 0.22.1 → 0.23.0

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.
Files changed (48) hide show
  1. package/android/src/main/java/io/fishjam/reactnative/PipContainerView.kt +282 -0
  2. package/android/src/main/java/io/fishjam/reactnative/PipContainerViewModule.kt +41 -0
  3. package/android/src/main/java/io/fishjam/reactnative/PipTrackSelector.kt +98 -0
  4. package/android/src/main/java/io/fishjam/reactnative/PipViewFactory.kt +186 -0
  5. package/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +9 -1
  6. package/android/src/main/java/io/fishjam/reactnative/VideoPreviewView.kt +2 -0
  7. package/android/src/main/java/io/fishjam/reactnative/VideoRendererView.kt +2 -0
  8. package/android/src/main/java/io/fishjam/reactnative/VideoView.kt +152 -11
  9. package/android/src/main/java/io/fishjam/reactnative/helpers/PictureInPictureHelperFragment.kt +20 -0
  10. package/android/src/main/java/io/fishjam/reactnative/managers/ListenerManager.kt +3 -1
  11. package/build/RNFishjamClientModule.d.ts +2 -0
  12. package/build/RNFishjamClientModule.d.ts.map +1 -1
  13. package/build/RNFishjamClientModule.js.map +1 -1
  14. package/build/components/PipContainerView.d.ts +48 -0
  15. package/build/components/PipContainerView.d.ts.map +1 -0
  16. package/build/components/PipContainerView.js +34 -0
  17. package/build/components/PipContainerView.js.map +1 -0
  18. package/build/index.d.ts +2 -0
  19. package/build/index.d.ts.map +1 -1
  20. package/build/index.js +1 -0
  21. package/build/index.js.map +1 -1
  22. package/build/livestream/components/LivestreamStreamer.d.ts +3 -30
  23. package/build/livestream/components/LivestreamStreamer.d.ts.map +1 -1
  24. package/build/livestream/components/LivestreamStreamer.js +3 -27
  25. package/build/livestream/components/LivestreamStreamer.js.map +1 -1
  26. package/build/livestream/components/LivestreamViewer.d.ts +2 -7
  27. package/build/livestream/components/LivestreamViewer.d.ts.map +1 -1
  28. package/build/livestream/components/LivestreamViewer.js +1 -1
  29. package/build/livestream/components/LivestreamViewer.js.map +1 -1
  30. package/build/livestream/hooks/useLivestreamStreamer.d.ts +40 -3
  31. package/build/livestream/hooks/useLivestreamStreamer.d.ts.map +1 -1
  32. package/build/livestream/hooks/useLivestreamStreamer.js +45 -3
  33. package/build/livestream/hooks/useLivestreamStreamer.js.map +1 -1
  34. package/build/livestream/hooks/useLivestreamViewer.d.ts +7 -0
  35. package/build/livestream/hooks/useLivestreamViewer.d.ts.map +1 -1
  36. package/build/livestream/hooks/useLivestreamViewer.js +39 -11
  37. package/build/livestream/hooks/useLivestreamViewer.js.map +1 -1
  38. package/build/livestream/index.d.ts +1 -1
  39. package/build/livestream/index.d.ts.map +1 -1
  40. package/build/livestream/index.js +1 -1
  41. package/build/livestream/index.js.map +1 -1
  42. package/expo-module.config.json +4 -2
  43. package/ios/PictureInPictureManager.swift +215 -0
  44. package/ios/PipContainerView.swift +56 -0
  45. package/ios/PipContainerViewModule.swift +48 -0
  46. package/ios/RNFishjamClient.swift +1 -0
  47. package/ios/RNFishjamClientModule.swift +4 -3
  48. package/package.json +2 -2
@@ -0,0 +1,48 @@
1
+ import ExpoModulesCore
2
+
3
+ public class PipContainerViewModule: Module {
4
+ public func definition() -> ModuleDefinition {
5
+ Name("PipContainerViewModule")
6
+
7
+ View(PipContainerView.self) {
8
+ Prop("startAutomatically") { (view: PipContainerView, value: Bool) in
9
+ Task { @MainActor in
10
+ view.startAutomatically = value
11
+ }
12
+ }
13
+
14
+ Prop("stopAutomatically") { (view: PipContainerView, value: Bool) in
15
+ Task { @MainActor in
16
+ view.stopAutomatically = value
17
+ }
18
+ }
19
+
20
+ Prop("allowsCameraInBackground") { (view: PipContainerView, value: Bool) in
21
+ Task { @MainActor in
22
+ view.allowsCameraInBackground = value
23
+ }
24
+ }
25
+
26
+ Prop("primaryPlaceholderText") { (view: PipContainerView, value: String) in
27
+ Task { @MainActor in
28
+ view.primaryPlaceholderText = value
29
+ }
30
+ }
31
+
32
+ Prop("secondaryPlaceholderText") { (view: PipContainerView, value: String) in
33
+ Task { @MainActor in
34
+ view.secondaryPlaceholderText = value
35
+ }
36
+ }
37
+
38
+ AsyncFunction("startPictureInPicture") { (view: PipContainerView) in
39
+ await view.startPictureInPicture()
40
+ }
41
+
42
+ AsyncFunction("stopPictureInPicture") { (view: PipContainerView) in
43
+ await view.stopPictureInPicture()
44
+ }
45
+ }
46
+ }
47
+ }
48
+
@@ -803,6 +803,7 @@ class RNFishjamClient: FishjamClientListener {
803
803
 
804
804
  func emitEndpoints() {
805
805
  emit(event: .peersUpdate())
806
+ RNFishjamClient.tracksUpdateListenersManager.notifyListeners()
806
807
  }
807
808
 
808
809
  func onJoined(peerID: String, peersInRoom: [String: Endpoint]) {
@@ -121,6 +121,10 @@ public class RNFishjamClientModule: Module {
121
121
  return rnFishjamClient.isCameraInitialized
122
122
  }
123
123
 
124
+ Property("hasActiveCallKitSession") {
125
+ return rnFishjamClient.hasActiveCallKitSession
126
+ }
127
+
124
128
  Function("getPeers") {
125
129
  return rnFishjamClient.getPeers()
126
130
  }
@@ -281,8 +285,5 @@ public class RNFishjamClientModule: Module {
281
285
  rnFishjamClient.endCallKitSession()
282
286
  }
283
287
 
284
- Property("hasActiveCallKitSession") {
285
- return rnFishjamClient.hasActiveCallKitSession
286
- }
287
288
  }
288
289
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishjam-cloud/react-native-client",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "description": "A React Native client for Fishjam",
5
5
  "author": "Fishjam Team",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "promise-fs": "^2.1.1",
44
44
  "protobufjs": "^7.4.0",
45
- "react-native-whip-whep": "0.3.1",
45
+ "react-native-whip-whep": "0.6.0",
46
46
  "zod": "^3.25.71"
47
47
  },
48
48
  "devDependencies": {