@fishjam-cloud/react-native-client 0.23.0-RC.0 → 0.24.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 (73) 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/FishjamRoom/index.d.ts.map +1 -1
  15. package/build/components/FishjamRoom/index.js +0 -1
  16. package/build/components/FishjamRoom/index.js.map +1 -1
  17. package/build/components/PipContainerView.d.ts +48 -0
  18. package/build/components/PipContainerView.d.ts.map +1 -0
  19. package/build/components/PipContainerView.js +34 -0
  20. package/build/components/PipContainerView.js.map +1 -0
  21. package/build/hooks/useAppScreenShare.d.ts +0 -2
  22. package/build/hooks/useAppScreenShare.d.ts.map +1 -1
  23. package/build/hooks/useAppScreenShare.js +0 -8
  24. package/build/hooks/useAppScreenShare.js.map +1 -1
  25. package/build/hooks/useCamera.d.ts +2 -2
  26. package/build/hooks/useCamera.d.ts.map +1 -1
  27. package/build/hooks/useCamera.js +1 -3
  28. package/build/hooks/useCamera.js.map +1 -1
  29. package/build/hooks/useScreenShare.d.ts +2 -3
  30. package/build/hooks/useScreenShare.d.ts.map +1 -1
  31. package/build/hooks/useScreenShare.js +0 -7
  32. package/build/hooks/useScreenShare.js.map +1 -1
  33. package/build/index.d.ts +2 -0
  34. package/build/index.d.ts.map +1 -1
  35. package/build/index.js +1 -0
  36. package/build/index.js.map +1 -1
  37. package/build/livestream/components/LivestreamStreamer.d.ts +3 -30
  38. package/build/livestream/components/LivestreamStreamer.d.ts.map +1 -1
  39. package/build/livestream/components/LivestreamStreamer.js +3 -27
  40. package/build/livestream/components/LivestreamStreamer.js.map +1 -1
  41. package/build/livestream/components/LivestreamViewer.d.ts +2 -7
  42. package/build/livestream/components/LivestreamViewer.d.ts.map +1 -1
  43. package/build/livestream/components/LivestreamViewer.js +1 -1
  44. package/build/livestream/components/LivestreamViewer.js.map +1 -1
  45. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts +49 -0
  46. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts.map +1 -0
  47. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js +58 -0
  48. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js.map +1 -0
  49. package/build/livestream/hooks/useLivestreamStreamer.d.ts +40 -3
  50. package/build/livestream/hooks/useLivestreamStreamer.d.ts.map +1 -1
  51. package/build/livestream/hooks/useLivestreamStreamer.js +44 -3
  52. package/build/livestream/hooks/useLivestreamStreamer.js.map +1 -1
  53. package/build/livestream/hooks/useLivestreamViewer.d.ts +7 -0
  54. package/build/livestream/hooks/useLivestreamViewer.d.ts.map +1 -1
  55. package/build/livestream/hooks/useLivestreamViewer.js +39 -11
  56. package/build/livestream/hooks/useLivestreamViewer.js.map +1 -1
  57. package/build/livestream/index.d.ts +2 -1
  58. package/build/livestream/index.d.ts.map +1 -1
  59. package/build/livestream/index.js +2 -1
  60. package/build/livestream/index.js.map +1 -1
  61. package/expo-module.config.json +4 -2
  62. package/ios/PictureInPictureManager.swift +215 -0
  63. package/ios/PipContainerView.swift +56 -0
  64. package/ios/PipContainerViewModule.swift +48 -0
  65. package/ios/RNFishjamClient.swift +1 -0
  66. package/ios/RNFishjamClientModule.swift +4 -3
  67. package/package.json +2 -2
  68. package/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift +1 -1
  69. package/plugin/broadcastExtensionFiles/Info.plist +1 -1
  70. package/plugin/build/types.d.ts +1 -0
  71. package/plugin/build/withFishjam.js +2 -2
  72. package/plugin/build/withFishjamAndroid.js +44 -5
  73. package/plugin/build/withFishjamIos.js +7 -2
@@ -42,14 +42,18 @@ function getSbeTargetName(props) {
42
42
  return (props?.ios?.broadcastExtensionTargetName ||
43
43
  'FishjamScreenBroadcastExtension');
44
44
  }
45
+ function getSbeDisplayName(props) {
46
+ return props?.ios?.broadcastExtensionDisplayName || 'FishjamScreenBroadcast';
47
+ }
45
48
  function getSbePodfileSnippet(props) {
46
49
  const targetName = getSbeTargetName(props);
47
- return `\ntarget '${targetName}' do\n pod 'FishjamCloudClient/Broadcast'\nend`;
50
+ return `\ntarget '${targetName}' do\n pod 'FishjamCloudBroadcastClient'\nend`;
48
51
  }
49
52
  const TARGETED_DEVICE_FAMILY = `"1,2"`;
50
53
  const IPHONEOS_DEPLOYMENT_TARGET = '15.1';
51
54
  const GROUP_IDENTIFIER_TEMPLATE_REGEX = /{{GROUP_IDENTIFIER}}/gm;
52
55
  const BUNDLE_IDENTIFIER_TEMPLATE_REGEX = /{{BUNDLE_IDENTIFIER}}/gm;
56
+ const DISPLAY_NAME_TEMPLATE_REGEX = /{{DISPLAY_NAME}}/gm;
53
57
  /**
54
58
  * A helper function for updating a value in a file for given regex
55
59
  */
@@ -62,7 +66,7 @@ async function updateFileWithRegex(iosPath, fileName, regex, value, props) {
62
66
  }
63
67
  /**
64
68
  * Inserts a required target to Podfile.
65
- * This is needed to provide the dependency of FishjamCloudClient/Broadcast to the extension.
69
+ * This is needed to provide the dependency of FishjamCloudBroadcastClient to the extension.
66
70
  */
67
71
  async function updatePodfile(iosPath, props) {
68
72
  const podfileSnippet = getSbePodfileSnippet(props);
@@ -205,6 +209,7 @@ const withFishjamSBE = (config, options) => (0, config_plugins_1.withXcodeProjec
205
209
  await updateFileWithRegex(iosPath, `${targetName}.entitlements`, GROUP_IDENTIFIER_TEMPLATE_REGEX, groupIdentifier, options);
206
210
  await updateFileWithRegex(iosPath, 'FishjamBroadcastSampleHandler.swift', GROUP_IDENTIFIER_TEMPLATE_REGEX, groupIdentifier, options);
207
211
  await updateFileWithRegex(iosPath, 'FishjamBroadcastSampleHandler.swift', BUNDLE_IDENTIFIER_TEMPLATE_REGEX, bundleIdentifier || '', options);
212
+ await updateFileWithRegex(iosPath, 'Info.plist', DISPLAY_NAME_TEMPLATE_REGEX, getSbeDisplayName(options), options);
208
213
  // Create new PBXGroup for the extension
209
214
  const extGroup = xcodeProject.addPbxGroup(extFiles, targetName, targetName);
210
215
  // Add the new PBXGroup to the top level group. This makes the