@fishjam-cloud/react-native-client 0.24.0 → 0.25.0-rc.2

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 (260) hide show
  1. package/README.md +56 -15
  2. package/dist/index.d.ts +13 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +19 -0
  5. package/dist/overrides/RTCPeerConnection.d.ts +8 -0
  6. package/dist/overrides/RTCPeerConnection.d.ts.map +1 -0
  7. package/dist/overrides/RTCPeerConnection.js +16 -0
  8. package/dist/overrides/RTCView.d.ts +11 -0
  9. package/dist/overrides/RTCView.d.ts.map +1 -0
  10. package/dist/overrides/RTCView.js +21 -0
  11. package/dist/polyfills/local-storage.d.ts +10 -0
  12. package/dist/polyfills/local-storage.d.ts.map +1 -0
  13. package/dist/polyfills/local-storage.js +24 -0
  14. package/{build/hooks → dist}/useForegroundService.d.ts +10 -10
  15. package/dist/useForegroundService.d.ts.map +1 -0
  16. package/dist/useForegroundService.js +10 -0
  17. package/dist/webrtc-polyfill.d.ts +2 -0
  18. package/dist/webrtc-polyfill.d.ts.map +1 -0
  19. package/dist/webrtc-polyfill.js +14 -0
  20. package/package.json +45 -92
  21. package/plugin/broadcastExtensionFiles/Atomic.swift +37 -0
  22. package/plugin/broadcastExtensionFiles/DarwinNotificationCenter.swift +29 -0
  23. package/plugin/broadcastExtensionFiles/Info.plist +1 -1
  24. package/plugin/broadcastExtensionFiles/SampleHandler.swift +104 -0
  25. package/plugin/broadcastExtensionFiles/SampleUploader.swift +146 -0
  26. package/plugin/broadcastExtensionFiles/SocketConnection.swift +198 -0
  27. package/plugin/build/types.d.ts +5 -4
  28. package/plugin/build/withFishjam.d.ts +31 -2
  29. package/plugin/build/withFishjam.js +31 -5
  30. package/plugin/build/withFishjamAndroid.d.ts +2 -2
  31. package/plugin/build/withFishjamAndroid.js +48 -40
  32. package/plugin/build/withFishjamIos.d.ts +3 -8
  33. package/plugin/build/withFishjamIos.js +52 -72
  34. package/LICENSE.txt +0 -201
  35. package/android/build.gradle +0 -95
  36. package/android/src/main/AndroidManifest.xml +0 -2
  37. package/android/src/main/java/io/fishjam/reactnative/AudioDeviceKind.kt +0 -34
  38. package/android/src/main/java/io/fishjam/reactnative/AudioSwitchManager.kt +0 -61
  39. package/android/src/main/java/io/fishjam/reactnative/EmitableEvents.kt +0 -126
  40. package/android/src/main/java/io/fishjam/reactnative/Errors.kt +0 -31
  41. package/android/src/main/java/io/fishjam/reactnative/PipContainerView.kt +0 -282
  42. package/android/src/main/java/io/fishjam/reactnative/PipContainerViewModule.kt +0 -41
  43. package/android/src/main/java/io/fishjam/reactnative/PipTrackSelector.kt +0 -98
  44. package/android/src/main/java/io/fishjam/reactnative/PipViewFactory.kt +0 -186
  45. package/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +0 -1001
  46. package/android/src/main/java/io/fishjam/reactnative/RNFishjamClientModule.kt +0 -358
  47. package/android/src/main/java/io/fishjam/reactnative/Utils.kt +0 -11
  48. package/android/src/main/java/io/fishjam/reactnative/VideoPreviewView.kt +0 -40
  49. package/android/src/main/java/io/fishjam/reactnative/VideoPreviewViewModule.kt +0 -22
  50. package/android/src/main/java/io/fishjam/reactnative/VideoRendererView.kt +0 -76
  51. package/android/src/main/java/io/fishjam/reactnative/VideoRendererViewModule.kt +0 -33
  52. package/android/src/main/java/io/fishjam/reactnative/VideoView.kt +0 -257
  53. package/android/src/main/java/io/fishjam/reactnative/extensions/CaptureDevice.kt +0 -17
  54. package/android/src/main/java/io/fishjam/reactnative/foregroundService/FishjamForegroundService.kt +0 -101
  55. package/android/src/main/java/io/fishjam/reactnative/foregroundService/ForegroundServiceManager.kt +0 -118
  56. package/android/src/main/java/io/fishjam/reactnative/foregroundService/ForegroundServiceState.kt +0 -46
  57. package/android/src/main/java/io/fishjam/reactnative/helpers/PictureInPictureHelperFragment.kt +0 -20
  58. package/android/src/main/java/io/fishjam/reactnative/managers/ListenerManager.kt +0 -24
  59. package/android/src/main/java/io/fishjam/reactnative/managers/LocalCameraTracksChangedListenersManager.kt +0 -8
  60. package/android/src/main/java/io/fishjam/reactnative/managers/LocalTracksSwitchListenersManager.kt +0 -17
  61. package/android/src/main/java/io/fishjam/reactnative/managers/TracksUpdateListenersManager.kt +0 -7
  62. package/android/src/main/java/io/fishjam/reactnative/utils/PermissionUtils.kt +0 -45
  63. package/build/RNFishjamClientModule.d.ts +0 -106
  64. package/build/RNFishjamClientModule.d.ts.map +0 -1
  65. package/build/RNFishjamClientModule.js +0 -21
  66. package/build/RNFishjamClientModule.js.map +0 -1
  67. package/build/common/metadata.d.ts +0 -9
  68. package/build/common/metadata.d.ts.map +0 -1
  69. package/build/common/metadata.js +0 -11
  70. package/build/common/metadata.js.map +0 -1
  71. package/build/components/FishjamRoom/GridTrackItem.d.ts +0 -12
  72. package/build/components/FishjamRoom/GridTrackItem.d.ts.map +0 -1
  73. package/build/components/FishjamRoom/GridTrackItem.js +0 -56
  74. package/build/components/FishjamRoom/GridTrackItem.js.map +0 -1
  75. package/build/components/FishjamRoom/VideosGrid.d.ts +0 -3
  76. package/build/components/FishjamRoom/VideosGrid.d.ts.map +0 -1
  77. package/build/components/FishjamRoom/VideosGrid.js +0 -20
  78. package/build/components/FishjamRoom/VideosGrid.js.map +0 -1
  79. package/build/components/FishjamRoom/index.d.ts +0 -33
  80. package/build/components/FishjamRoom/index.d.ts.map +0 -1
  81. package/build/components/FishjamRoom/index.js +0 -52
  82. package/build/components/FishjamRoom/index.js.map +0 -1
  83. package/build/components/FishjamRoom/parsePeersToTracks.d.ts +0 -4
  84. package/build/components/FishjamRoom/parsePeersToTracks.d.ts.map +0 -1
  85. package/build/components/FishjamRoom/parsePeersToTracks.js +0 -37
  86. package/build/components/FishjamRoom/parsePeersToTracks.js.map +0 -1
  87. package/build/components/PipContainerView.d.ts +0 -48
  88. package/build/components/PipContainerView.d.ts.map +0 -1
  89. package/build/components/PipContainerView.js +0 -34
  90. package/build/components/PipContainerView.js.map +0 -1
  91. package/build/components/VideoPreviewView.d.ts +0 -28
  92. package/build/components/VideoPreviewView.d.ts.map +0 -1
  93. package/build/components/VideoPreviewView.js +0 -17
  94. package/build/components/VideoPreviewView.js.map +0 -1
  95. package/build/components/VideoRendererView.d.ts +0 -39
  96. package/build/components/VideoRendererView.d.ts.map +0 -1
  97. package/build/components/VideoRendererView.js +0 -25
  98. package/build/components/VideoRendererView.js.map +0 -1
  99. package/build/consts/index.d.ts +0 -5
  100. package/build/consts/index.d.ts.map +0 -1
  101. package/build/consts/index.js +0 -8
  102. package/build/consts/index.js.map +0 -1
  103. package/build/debug/common/webRTC.d.ts +0 -9
  104. package/build/debug/common/webRTC.d.ts.map +0 -1
  105. package/build/debug/common/webRTC.js +0 -11
  106. package/build/debug/common/webRTC.js.map +0 -1
  107. package/build/debug/index.d.ts +0 -4
  108. package/build/debug/index.d.ts.map +0 -1
  109. package/build/debug/index.js +0 -3
  110. package/build/debug/index.js.map +0 -1
  111. package/build/debug/stats/types.d.ts +0 -55
  112. package/build/debug/stats/types.d.ts.map +0 -1
  113. package/build/debug/stats/types.js +0 -2
  114. package/build/debug/stats/types.js.map +0 -1
  115. package/build/debug/stats/useRTCStatistics.d.ts +0 -9
  116. package/build/debug/stats/useRTCStatistics.d.ts.map +0 -1
  117. package/build/debug/stats/useRTCStatistics.js +0 -79
  118. package/build/debug/stats/useRTCStatistics.js.map +0 -1
  119. package/build/hooks/internal/useFishjamEvent.d.ts +0 -4
  120. package/build/hooks/internal/useFishjamEvent.d.ts.map +0 -1
  121. package/build/hooks/internal/useFishjamEvent.js +0 -38
  122. package/build/hooks/internal/useFishjamEvent.js.map +0 -1
  123. package/build/hooks/internal/useFishjamEventState.d.ts +0 -3
  124. package/build/hooks/internal/useFishjamEventState.d.ts.map +0 -1
  125. package/build/hooks/internal/useFishjamEventState.js +0 -18
  126. package/build/hooks/internal/useFishjamEventState.js.map +0 -1
  127. package/build/hooks/useAppScreenShare.d.ts +0 -18
  128. package/build/hooks/useAppScreenShare.d.ts.map +0 -1
  129. package/build/hooks/useAppScreenShare.js +0 -46
  130. package/build/hooks/useAppScreenShare.js.map +0 -1
  131. package/build/hooks/useAudioSettings.d.ts +0 -49
  132. package/build/hooks/useAudioSettings.d.ts.map +0 -1
  133. package/build/hooks/useAudioSettings.js +0 -70
  134. package/build/hooks/useAudioSettings.js.map +0 -1
  135. package/build/hooks/useBandwidthEstimation.d.ts +0 -14
  136. package/build/hooks/useBandwidthEstimation.d.ts.map +0 -1
  137. package/build/hooks/useBandwidthEstimation.js +0 -19
  138. package/build/hooks/useBandwidthEstimation.js.map +0 -1
  139. package/build/hooks/useCallKit.d.ts +0 -121
  140. package/build/hooks/useCallKit.d.ts.map +0 -1
  141. package/build/hooks/useCallKit.js +0 -142
  142. package/build/hooks/useCallKit.js.map +0 -1
  143. package/build/hooks/useCamera.d.ts +0 -113
  144. package/build/hooks/useCamera.d.ts.map +0 -1
  145. package/build/hooks/useCamera.js +0 -93
  146. package/build/hooks/useCamera.js.map +0 -1
  147. package/build/hooks/useConnection.d.ts +0 -73
  148. package/build/hooks/useConnection.d.ts.map +0 -1
  149. package/build/hooks/useConnection.js +0 -46
  150. package/build/hooks/useConnection.js.map +0 -1
  151. package/build/hooks/useForegroundService.d.ts.map +0 -1
  152. package/build/hooks/useForegroundService.js +0 -66
  153. package/build/hooks/useForegroundService.js.map +0 -1
  154. package/build/hooks/useMicrophone.d.ts +0 -16
  155. package/build/hooks/useMicrophone.d.ts.map +0 -1
  156. package/build/hooks/useMicrophone.js +0 -31
  157. package/build/hooks/useMicrophone.js.map +0 -1
  158. package/build/hooks/usePeerStatus.d.ts +0 -10
  159. package/build/hooks/usePeerStatus.d.ts.map +0 -1
  160. package/build/hooks/usePeerStatus.js +0 -13
  161. package/build/hooks/usePeerStatus.js.map +0 -1
  162. package/build/hooks/usePeers.d.ts +0 -98
  163. package/build/hooks/usePeers.d.ts.map +0 -1
  164. package/build/hooks/usePeers.js +0 -81
  165. package/build/hooks/usePeers.js.map +0 -1
  166. package/build/hooks/usePermissions.d.ts +0 -24
  167. package/build/hooks/usePermissions.d.ts.map +0 -1
  168. package/build/hooks/usePermissions.js +0 -61
  169. package/build/hooks/usePermissions.js.map +0 -1
  170. package/build/hooks/useReconnection.d.ts +0 -11
  171. package/build/hooks/useReconnection.d.ts.map +0 -1
  172. package/build/hooks/useReconnection.js +0 -14
  173. package/build/hooks/useReconnection.js.map +0 -1
  174. package/build/hooks/useSandbox.d.ts +0 -20
  175. package/build/hooks/useSandbox.d.ts.map +0 -1
  176. package/build/hooks/useSandbox.js +0 -54
  177. package/build/hooks/useSandbox.js.map +0 -1
  178. package/build/hooks/useScreenShare.d.ts +0 -36
  179. package/build/hooks/useScreenShare.d.ts.map +0 -1
  180. package/build/hooks/useScreenShare.js +0 -45
  181. package/build/hooks/useScreenShare.js.map +0 -1
  182. package/build/hooks/useUpdatePeerMetadata.d.ts +0 -15
  183. package/build/hooks/useUpdatePeerMetadata.d.ts.map +0 -1
  184. package/build/hooks/useUpdatePeerMetadata.js +0 -21
  185. package/build/hooks/useUpdatePeerMetadata.js.map +0 -1
  186. package/build/index.d.ts +0 -36
  187. package/build/index.d.ts.map +0 -1
  188. package/build/index.js +0 -30
  189. package/build/index.js.map +0 -1
  190. package/build/livestream/components/LivestreamStreamer.d.ts +0 -24
  191. package/build/livestream/components/LivestreamStreamer.d.ts.map +0 -1
  192. package/build/livestream/components/LivestreamStreamer.js +0 -12
  193. package/build/livestream/components/LivestreamStreamer.js.map +0 -1
  194. package/build/livestream/components/LivestreamViewer.d.ts +0 -46
  195. package/build/livestream/components/LivestreamViewer.d.ts.map +0 -1
  196. package/build/livestream/components/LivestreamViewer.js +0 -10
  197. package/build/livestream/components/LivestreamViewer.js.map +0 -1
  198. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts +0 -49
  199. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts.map +0 -1
  200. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js +0 -58
  201. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js.map +0 -1
  202. package/build/livestream/hooks/useLivestreamStreamer.d.ts +0 -65
  203. package/build/livestream/hooks/useLivestreamStreamer.d.ts.map +0 -1
  204. package/build/livestream/hooks/useLivestreamStreamer.js +0 -71
  205. package/build/livestream/hooks/useLivestreamStreamer.js.map +0 -1
  206. package/build/livestream/hooks/useLivestreamViewer.d.ts +0 -36
  207. package/build/livestream/hooks/useLivestreamViewer.d.ts.map +0 -1
  208. package/build/livestream/hooks/useLivestreamViewer.js +0 -73
  209. package/build/livestream/hooks/useLivestreamViewer.js.map +0 -1
  210. package/build/livestream/index.d.ts +0 -12
  211. package/build/livestream/index.d.ts.map +0 -1
  212. package/build/livestream/index.js +0 -7
  213. package/build/livestream/index.js.map +0 -1
  214. package/build/protos/fishjam/peer_notifications.d.ts +0 -63
  215. package/build/protos/fishjam/peer_notifications.d.ts.map +0 -1
  216. package/build/protos/fishjam/peer_notifications.js +0 -235
  217. package/build/protos/fishjam/peer_notifications.js.map +0 -1
  218. package/build/types.d.ts +0 -34
  219. package/build/types.d.ts.map +0 -1
  220. package/build/types.js +0 -2
  221. package/build/types.js.map +0 -1
  222. package/build/utils/config.d.ts +0 -6
  223. package/build/utils/config.d.ts.map +0 -1
  224. package/build/utils/config.js +0 -10
  225. package/build/utils/config.js.map +0 -1
  226. package/build/utils/errorListener.d.ts +0 -2
  227. package/build/utils/errorListener.d.ts.map +0 -1
  228. package/build/utils/errorListener.js +0 -15
  229. package/build/utils/errorListener.js.map +0 -1
  230. package/build/utils/eventPayloadValidator.d.ts +0 -3
  231. package/build/utils/eventPayloadValidator.d.ts.map +0 -1
  232. package/build/utils/eventPayloadValidator.js +0 -86
  233. package/build/utils/eventPayloadValidator.js.map +0 -1
  234. package/build/utils/getFishjamUrl.d.ts +0 -2
  235. package/build/utils/getFishjamUrl.d.ts.map +0 -1
  236. package/build/utils/getFishjamUrl.js +0 -10
  237. package/build/utils/getFishjamUrl.js.map +0 -1
  238. package/debug/package.json +0 -4
  239. package/expo-module.config.json +0 -19
  240. package/ios/CameraPermissionsRequester.swift +0 -117
  241. package/ios/Events.swift +0 -152
  242. package/ios/PictureInPictureManager.swift +0 -215
  243. package/ios/PipContainerView.swift +0 -56
  244. package/ios/PipContainerViewModule.swift +0 -48
  245. package/ios/RNFishjamClient.podspec +0 -30
  246. package/ios/RNFishjamClient.swift +0 -995
  247. package/ios/RNFishjamClientModule.swift +0 -289
  248. package/ios/RNFishjamProxy.swift +0 -12
  249. package/ios/Utils/PermissionUtils.swift +0 -16
  250. package/ios/Utils.swift +0 -23
  251. package/ios/VideoPreviewView.swift +0 -54
  252. package/ios/VideoPreviewViewModule.swift +0 -21
  253. package/ios/VideoRendererView.swift +0 -98
  254. package/ios/VideoRendererViewModule.swift +0 -23
  255. package/ios/extensions/AVCaptureDevice.swift +0 -20
  256. package/ios/managers/LocalCameraTracksChangedListenersManager.swift +0 -23
  257. package/ios/managers/TracksUpdateListenersManager.swift +0 -21
  258. package/livestream/package.json +0 -4
  259. package/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift +0 -50
  260. /package/plugin/broadcastExtensionFiles/{FishjamScreenBroadcastExtension.entitlements → ScreenBroadcastExtension.entitlements} +0 -0
@@ -1,106 +0,0 @@
1
- import { PermissionResponse } from 'expo-modules-core';
2
- import type { NativeModule } from 'expo-modules-core/types';
3
- import type { RTCStats } from './debug/stats/types';
4
- import type { OnAudioDeviceEvent } from './hooks/useAudioSettings';
5
- import type { Camera, CameraConfigInternal, CurrentCameraChangedType } from './hooks/useCamera';
6
- import type { PeerStatus, ReconnectionStatus, ConnectionConfig } from './hooks/useConnection';
7
- import type { ForegroundServiceConfig } from './hooks/useForegroundService';
8
- import type { Peer } from './hooks/usePeers';
9
- import type { ScreenShareOptionsInternal } from './hooks/useScreenShare';
10
- import type { GenericMetadata, SimulcastConfig } from './types';
11
- import type { CallKitAction } from './hooks/useCallKit';
12
- type Metadata = {
13
- [key: string]: unknown;
14
- };
15
- type RNFishjamClient = {
16
- isMicrophoneOn: boolean;
17
- isCameraOn: boolean;
18
- isScreenShareOn: boolean;
19
- isAppScreenShareOn: boolean;
20
- cameras: readonly Camera[];
21
- currentCamera: Camera | null;
22
- peerStatus: PeerStatus;
23
- reconnectionStatus: ReconnectionStatus;
24
- isCameraInitialized: boolean;
25
- hasActiveCallKitSession: boolean;
26
- getPeers: <PeerMetadataType extends Metadata, ServerMetadata extends Metadata = GenericMetadata>() => Peer<PeerMetadataType, ServerMetadata>[];
27
- joinRoom: (url: string, peerToken: string, peerMetadata: Metadata, config: ConnectionConfig) => Promise<void>;
28
- leaveRoom: () => Promise<void>;
29
- startCamera: (config: CameraConfigInternal) => Promise<boolean>;
30
- toggleMicrophone: () => Promise<boolean>;
31
- toggleCamera: () => Promise<boolean>;
32
- flipCamera: () => Promise<void>;
33
- switchCamera: (cameraId: string) => Promise<void>;
34
- handleScreenSharePermission: () => Promise<'granted' | 'denied'>;
35
- toggleScreenShare: (screenShareOptions: Partial<ScreenShareOptionsInternal>) => Promise<void>;
36
- toggleAppScreenShare: (screenShareOptions: Partial<ScreenShareOptionsInternal>) => Promise<void>;
37
- updatePeerMetadata: <MetadataType extends Metadata>(metadata: MetadataType) => Promise<void>;
38
- updateVideoTrackMetadata: <MetadataType extends Metadata>(metadata: MetadataType) => Promise<void>;
39
- updateScreenShareTrackMetadata: <MetadataType extends Metadata>(metadata: MetadataType) => Promise<void>;
40
- setOutputAudioDevice: (audioDevice: string) => Promise<void>;
41
- startAudioSwitcher: () => Promise<void>;
42
- stopAudioSwitcher: () => Promise<void>;
43
- selectAudioSessionMode: (sessionMode: string) => Promise<void>;
44
- showAudioRoutePicker: () => Promise<void>;
45
- toggleScreenShareTrackEncoding: (encoding: string) => Promise<SimulcastConfig>;
46
- setScreenShareTrackBandwidth: (bandwidth: number) => Promise<void>;
47
- setScreenShareTrackEncodingBandwidth: (encoding: string, bandwidth: number) => Promise<void>;
48
- setTargetTrackEncoding: (trackId: string, encoding: string) => Promise<void>;
49
- toggleVideoTrackEncoding: (encoding: string) => Promise<SimulcastConfig>;
50
- setVideoTrackEncodingBandwidth: (encoding: string, bandwidth: number) => Promise<void>;
51
- setVideoTrackBandwidth: (bandwidth: number) => Promise<void>;
52
- changeWebRTCLoggingSeverity: (severity: string) => Promise<void>;
53
- getStatistics: () => Promise<RTCStats>;
54
- getCameraPermissionsAsync: () => Promise<PermissionResponse>;
55
- requestCameraPermissionsAsync: () => Promise<PermissionResponse>;
56
- getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;
57
- requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;
58
- startForegroundService: (config: ForegroundServiceConfig) => Promise<void>;
59
- stopForegroundService: () => void;
60
- startMicrophone: () => Promise<void>;
61
- stopMicrophone: () => Promise<void>;
62
- startCallKitSession: (displayName: string, isVideo: boolean) => Promise<void>;
63
- endCallKitSession: () => Promise<void>;
64
- };
65
- export declare const ReceivableEvents: {
66
- readonly IsMicrophoneOn: "IsMicrophoneOn";
67
- readonly IsScreenShareOn: "IsScreenShareOn";
68
- readonly IsAppScreenShareOn: "IsAppScreenShareOn";
69
- readonly SimulcastConfigUpdate: "SimulcastConfigUpdate";
70
- readonly PeersUpdate: "PeersUpdate";
71
- readonly AudioDeviceUpdate: "AudioDeviceUpdate";
72
- readonly BandwidthEstimation: "BandwidthEstimation";
73
- readonly ReconnectionRetriesLimitReached: "ReconnectionRetriesLimitReached";
74
- readonly ReconnectionStarted: "ReconnectionStarted";
75
- readonly Reconnected: "Reconnected";
76
- readonly Warning: "Warning";
77
- readonly PeerStatusChanged: "PeerStatusChanged";
78
- readonly ReconnectionStatusChanged: "ReconnectionStatusChanged";
79
- readonly CurrentCameraChanged: "CurrentCameraChanged";
80
- readonly TrackAspectRatioUpdated: "TrackAspectRatioUpdated";
81
- readonly CallKitActionPerformed: "CallKitActionPerformed";
82
- };
83
- export type ReceivableEventPayloads = {
84
- [ReceivableEvents.IsMicrophoneOn]: boolean;
85
- [ReceivableEvents.IsScreenShareOn]: boolean;
86
- [ReceivableEvents.IsAppScreenShareOn]: boolean;
87
- [ReceivableEvents.SimulcastConfigUpdate]: SimulcastConfig;
88
- [ReceivableEvents.PeersUpdate]: void;
89
- [ReceivableEvents.AudioDeviceUpdate]: OnAudioDeviceEvent;
90
- [ReceivableEvents.BandwidthEstimation]: number | null;
91
- [ReceivableEvents.ReconnectionRetriesLimitReached]: void;
92
- [ReceivableEvents.ReconnectionStarted]: void;
93
- [ReceivableEvents.Reconnected]: void;
94
- [ReceivableEvents.Warning]: string;
95
- [ReceivableEvents.PeerStatusChanged]: PeerStatus;
96
- [ReceivableEvents.ReconnectionStatusChanged]: ReconnectionStatus;
97
- [ReceivableEvents.CurrentCameraChanged]: CurrentCameraChangedType;
98
- [ReceivableEvents.TrackAspectRatioUpdated]: {
99
- trackId: string;
100
- aspectRatio: number | null;
101
- };
102
- [ReceivableEvents.CallKitActionPerformed]: CallKitAction;
103
- };
104
- declare const _default: RNFishjamClient & NativeModule<Record<keyof typeof ReceivableEvents, (payload: ReceivableEventPayloads) => void>>;
105
- export default _default;
106
- //# sourceMappingURL=RNFishjamClientModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RNFishjamClientModule.d.ts","sourceRoot":"","sources":["../src/RNFishjamClientModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,mBAAmB,CAAC;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EACV,MAAM,EACN,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;A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D,eAAe,GACtE,YAAY,CACV,MAAM,CACJ,MAAM,OAAO,gBAAgB,EAC7B,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAC3C,CACF;AANH,wBAMI"}
@@ -1,21 +0,0 @@
1
- import { requireNativeModule } from 'expo-modules-core';
2
- export const ReceivableEvents = {
3
- IsMicrophoneOn: 'IsMicrophoneOn',
4
- IsScreenShareOn: 'IsScreenShareOn',
5
- IsAppScreenShareOn: 'IsAppScreenShareOn', // only for iOS
6
- SimulcastConfigUpdate: 'SimulcastConfigUpdate',
7
- PeersUpdate: 'PeersUpdate',
8
- AudioDeviceUpdate: 'AudioDeviceUpdate',
9
- BandwidthEstimation: 'BandwidthEstimation',
10
- ReconnectionRetriesLimitReached: 'ReconnectionRetriesLimitReached',
11
- ReconnectionStarted: 'ReconnectionStarted',
12
- Reconnected: 'Reconnected',
13
- Warning: 'Warning',
14
- PeerStatusChanged: 'PeerStatusChanged',
15
- ReconnectionStatusChanged: 'ReconnectionStatusChanged',
16
- CurrentCameraChanged: 'CurrentCameraChanged',
17
- TrackAspectRatioUpdated: 'TrackAspectRatioUpdated',
18
- CallKitActionPerformed: 'CallKitActionPerformed',
19
- };
20
- export default requireNativeModule('RNFishjamClient');
21
- //# sourceMappingURL=RNFishjamClientModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RNFishjamClientModule.js","sourceRoot":"","sources":["../src/RNFishjamClientModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAsG5E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,oBAAoB,EAAE,eAAe;IACzD,qBAAqB,EAAE,uBAAuB;IAC9C,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,+BAA+B,EAAE,iCAAiC;IAClE,mBAAmB,EAAE,qBAAqB;IAC1C,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,mBAAmB;IACtC,yBAAyB,EAAE,2BAA2B;IACtD,oBAAoB,EAAE,sBAAsB;IAC5C,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;CACxC,CAAC;AAwBX,eAAe,mBAAmB,CAAC,iBAAiB,CAMjD,CAAC","sourcesContent":["import { PermissionResponse, requireNativeModule } from 'expo-modules-core';\n\nimport type { NativeModule } from 'expo-modules-core/types';\nimport type { RTCStats } from './debug/stats/types';\nimport type { OnAudioDeviceEvent } from './hooks/useAudioSettings';\nimport type {\n Camera,\n CameraConfigInternal,\n CurrentCameraChangedType,\n} from './hooks/useCamera';\nimport type {\n PeerStatus,\n ReconnectionStatus,\n ConnectionConfig,\n} from './hooks/useConnection';\nimport type { ForegroundServiceConfig } from './hooks/useForegroundService';\nimport type { Peer } from './hooks/usePeers';\nimport type { ScreenShareOptionsInternal } from './hooks/useScreenShare';\nimport type { GenericMetadata, SimulcastConfig } from './types';\nimport type { CallKitAction } from './hooks/useCallKit';\n\ntype Metadata = { [key: string]: unknown };\n\ntype RNFishjamClient = {\n isMicrophoneOn: boolean;\n isCameraOn: boolean;\n isScreenShareOn: boolean;\n isAppScreenShareOn: boolean; // only available on ios\n cameras: readonly Camera[];\n currentCamera: Camera | null;\n peerStatus: PeerStatus;\n reconnectionStatus: ReconnectionStatus;\n isCameraInitialized: boolean;\n hasActiveCallKitSession: boolean;\n\n getPeers: <\n PeerMetadataType extends Metadata,\n ServerMetadata extends Metadata = GenericMetadata,\n >() => Peer<PeerMetadataType, ServerMetadata>[];\n\n joinRoom: (\n url: string,\n peerToken: string,\n peerMetadata: Metadata,\n config: ConnectionConfig,\n ) => Promise<void>;\n leaveRoom: () => Promise<void>;\n startCamera: (config: CameraConfigInternal) => Promise<boolean>;\n toggleMicrophone: () => Promise<boolean>;\n toggleCamera: () => Promise<boolean>;\n flipCamera: () => Promise<void>;\n switchCamera: (cameraId: string) => Promise<void>;\n handleScreenSharePermission: () => Promise<'granted' | 'denied'>;\n toggleScreenShare: (\n screenShareOptions: Partial<ScreenShareOptionsInternal>,\n ) => Promise<void>;\n toggleAppScreenShare: (\n screenShareOptions: Partial<ScreenShareOptionsInternal>,\n ) => Promise<void>;\n updatePeerMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n updateVideoTrackMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n updateScreenShareTrackMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n setOutputAudioDevice: (audioDevice: string) => Promise<void>;\n startAudioSwitcher: () => Promise<void>;\n stopAudioSwitcher: () => Promise<void>;\n selectAudioSessionMode: (sessionMode: string) => Promise<void>;\n showAudioRoutePicker: () => Promise<void>;\n toggleScreenShareTrackEncoding: (\n encoding: string,\n ) => Promise<SimulcastConfig>;\n setScreenShareTrackBandwidth: (bandwidth: number) => Promise<void>;\n setScreenShareTrackEncodingBandwidth: (\n encoding: string,\n bandwidth: number,\n ) => Promise<void>;\n setTargetTrackEncoding: (trackId: string, encoding: string) => Promise<void>;\n toggleVideoTrackEncoding: (encoding: string) => Promise<SimulcastConfig>;\n setVideoTrackEncodingBandwidth: (\n encoding: string,\n bandwidth: number,\n ) => Promise<void>;\n setVideoTrackBandwidth: (bandwidth: number) => Promise<void>;\n changeWebRTCLoggingSeverity: (severity: string) => Promise<void>;\n getStatistics: () => Promise<RTCStats>;\n getCameraPermissionsAsync: () => Promise<PermissionResponse>;\n requestCameraPermissionsAsync: () => Promise<PermissionResponse>;\n getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n startForegroundService: (config: ForegroundServiceConfig) => Promise<void>;\n stopForegroundService: () => void;\n startMicrophone: () => Promise<void>;\n stopMicrophone: () => Promise<void>;\n startCallKitSession: (displayName: string, isVideo: boolean) => Promise<void>;\n endCallKitSession: () => Promise<void>;\n};\n\nexport const ReceivableEvents = {\n IsMicrophoneOn: 'IsMicrophoneOn',\n IsScreenShareOn: 'IsScreenShareOn',\n IsAppScreenShareOn: 'IsAppScreenShareOn', // only for iOS\n SimulcastConfigUpdate: 'SimulcastConfigUpdate',\n PeersUpdate: 'PeersUpdate',\n AudioDeviceUpdate: 'AudioDeviceUpdate',\n BandwidthEstimation: 'BandwidthEstimation',\n ReconnectionRetriesLimitReached: 'ReconnectionRetriesLimitReached',\n ReconnectionStarted: 'ReconnectionStarted',\n Reconnected: 'Reconnected',\n Warning: 'Warning',\n PeerStatusChanged: 'PeerStatusChanged',\n ReconnectionStatusChanged: 'ReconnectionStatusChanged',\n CurrentCameraChanged: 'CurrentCameraChanged',\n TrackAspectRatioUpdated: 'TrackAspectRatioUpdated',\n CallKitActionPerformed: 'CallKitActionPerformed',\n} as const;\n\nexport type ReceivableEventPayloads = {\n [ReceivableEvents.IsMicrophoneOn]: boolean;\n [ReceivableEvents.IsScreenShareOn]: boolean;\n [ReceivableEvents.IsAppScreenShareOn]: boolean;\n [ReceivableEvents.SimulcastConfigUpdate]: SimulcastConfig;\n [ReceivableEvents.PeersUpdate]: void;\n [ReceivableEvents.AudioDeviceUpdate]: OnAudioDeviceEvent;\n [ReceivableEvents.BandwidthEstimation]: number | null;\n [ReceivableEvents.ReconnectionRetriesLimitReached]: void;\n [ReceivableEvents.ReconnectionStarted]: void;\n [ReceivableEvents.Reconnected]: void;\n [ReceivableEvents.Warning]: string;\n [ReceivableEvents.PeerStatusChanged]: PeerStatus;\n [ReceivableEvents.ReconnectionStatusChanged]: ReconnectionStatus;\n [ReceivableEvents.CurrentCameraChanged]: CurrentCameraChangedType;\n [ReceivableEvents.TrackAspectRatioUpdated]: {\n trackId: string;\n aspectRatio: number | null;\n };\n [ReceivableEvents.CallKitActionPerformed]: CallKitAction;\n};\n\nexport default requireNativeModule('RNFishjamClient') as RNFishjamClient &\n NativeModule<\n Record<\n keyof typeof ReceivableEvents,\n (payload: ReceivableEventPayloads) => void\n >\n >;\n"]}
@@ -1,9 +0,0 @@
1
- import { GenericMetadata } from '../types';
2
- /**
3
- * Updates metadata send to other peers
4
- * @param peerMetadata string indexed record with metadata, that will be available to all other peers
5
- * @deprecated
6
- * @ignore
7
- */
8
- export declare function updatePeerMetadata<PeerMetadata extends GenericMetadata = GenericMetadata>(peerMetadata: PeerMetadata): Promise<void>;
9
- //# sourceMappingURL=metadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,SAAS,eAAe,GAAG,eAAe,EACtD,YAAY,EAAE,YAAY,iBAE3B"}
@@ -1,11 +0,0 @@
1
- import RNFishjamClientModule from '../RNFishjamClientModule';
2
- /**
3
- * Updates metadata send to other peers
4
- * @param peerMetadata string indexed record with metadata, that will be available to all other peers
5
- * @deprecated
6
- * @ignore
7
- */
8
- export async function updatePeerMetadata(peerMetadata) {
9
- await RNFishjamClientModule.updatePeerMetadata(peerMetadata);
10
- }
11
- //# sourceMappingURL=metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAEtC,YAA0B;IAC1B,MAAM,qBAAqB,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import { GenericMetadata } from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\n\n/**\n * Updates metadata send to other peers\n * @param peerMetadata string indexed record with metadata, that will be available to all other peers\n * @deprecated\n * @ignore\n */\nexport async function updatePeerMetadata<\n PeerMetadata extends GenericMetadata = GenericMetadata,\n>(peerMetadata: PeerMetadata) {\n await RNFishjamClientModule.updatePeerMetadata(peerMetadata);\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { Track } from '../../hooks/usePeers';
2
- export type GridTrack = {
3
- track: Track | null;
4
- peerId: string;
5
- isLocal: boolean;
6
- isVadActive: boolean;
7
- aspectRatio: number | null;
8
- };
9
- export declare const GridTrackItem: ({ peer }: {
10
- peer: GridTrack;
11
- }) => import("react").JSX.Element;
12
- //# sourceMappingURL=GridTrackItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridTrackItem.d.ts","sourceRoot":"","sources":["../../../src/components/FishjamRoom/GridTrackItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,gCAiC1D,CAAC"}
@@ -1,56 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { View, StyleSheet, Text } from 'react-native';
3
- import { VideoRendererView } from '../VideoRendererView';
4
- export const GridTrackItem = ({ peer }) => {
5
- const videoContainer = useMemo(() => [
6
- styles.video,
7
- {
8
- backgroundColor: peer.isLocal ? '#606619' : '#7089DB',
9
- },
10
- ], [peer.isLocal]);
11
- return (<View style={styles.container}>
12
- <View style={videoContainer}>
13
- {peer.track ? (<VideoRendererView trackId={peer.track.id} videoLayout="FIT" style={styles.videoContent}/>) : (<View style={styles.videoContent}>
14
- <Text>No video</Text>
15
- </View>)}
16
- {peer.isVadActive && (<View style={styles.vadIcon}>
17
- <Text>speaking</Text>
18
- </View>)}
19
- </View>
20
- </View>);
21
- };
22
- const styles = StyleSheet.create({
23
- container: {
24
- flex: 1,
25
- marginBottom: 10,
26
- },
27
- videoContent: {
28
- flex: 1,
29
- alignItems: 'center',
30
- justifyContent: 'center',
31
- },
32
- video: {
33
- flex: 1,
34
- aspectRatio: 1,
35
- borderRadius: 8,
36
- overflow: 'hidden',
37
- borderColor: '#001A72',
38
- borderWidth: 2,
39
- },
40
- vadIcon: {
41
- position: 'absolute',
42
- top: 10,
43
- right: 10,
44
- opacity: 0.5,
45
- },
46
- userLabel: {
47
- position: 'absolute',
48
- bottom: 10,
49
- right: 10,
50
- opacity: 0.5,
51
- backgroundColor: '#F5F7FE',
52
- borderRadius: 4,
53
- padding: 3,
54
- },
55
- });
56
- //# sourceMappingURL=GridTrackItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridTrackItem.js","sourceRoot":"","sources":["../../../src/components/FishjamRoom/GridTrackItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAWzD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAuB,EAAE,EAAE;IAC7D,MAAM,cAAc,GAAG,OAAO,CAC5B,GAAG,EAAE,CAAC;QACJ,MAAM,CAAC,KAAK;QACZ;YACE,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;SACtD;KACF,EACD,CAAC,IAAI,CAAC,OAAO,CAAC,CACf,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAA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AU;QACpB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,GAAG;QACZ,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;KACX;CACF,CAAC,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { View, StyleSheet, Text } from 'react-native';\nimport { VideoRendererView } from '../VideoRendererView';\nimport { Track } from '../../hooks/usePeers';\n\nexport type GridTrack = {\n track: Track | null;\n peerId: string;\n isLocal: boolean;\n isVadActive: boolean;\n aspectRatio: number | null;\n};\n\nexport const GridTrackItem = ({ peer }: { peer: GridTrack }) => {\n const videoContainer = useMemo(\n () => [\n styles.video,\n {\n backgroundColor: peer.isLocal ? '#606619' : '#7089DB',\n },\n ],\n [peer.isLocal],\n );\n\n return (\n <View style={styles.container}>\n <View style={videoContainer}>\n {peer.track ? (\n <VideoRendererView\n trackId={peer.track.id}\n videoLayout=\"FIT\"\n style={styles.videoContent}\n />\n ) : (\n <View style={styles.videoContent}>\n <Text>No video</Text>\n </View>\n )}\n {peer.isVadActive && (\n <View style={styles.vadIcon}>\n <Text>speaking</Text>\n </View>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n marginBottom: 10,\n },\n videoContent: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n video: {\n flex: 1,\n aspectRatio: 1,\n borderRadius: 8,\n overflow: 'hidden',\n borderColor: '#001A72',\n borderWidth: 2,\n },\n vadIcon: {\n position: 'absolute',\n top: 10,\n right: 10,\n opacity: 0.5,\n },\n userLabel: {\n position: 'absolute',\n bottom: 10,\n right: 10,\n opacity: 0.5,\n backgroundColor: '#F5F7FE',\n borderRadius: 4,\n padding: 3,\n },\n});\n"]}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const VideosGrid: () => React.JSX.Element;
3
- //# sourceMappingURL=VideosGrid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VideosGrid.d.ts","sourceRoot":"","sources":["../../../src/components/FishjamRoom/VideosGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAO3C,eAAO,MAAM,UAAU,yBAkBtB,CAAC"}
@@ -1,20 +0,0 @@
1
- import React, { useCallback } from 'react';
2
- import { FlatList, StyleSheet } from 'react-native';
3
- import { GridTrackItem } from './GridTrackItem';
4
- import { parsePeersToTracks } from './parsePeersToTracks';
5
- import { usePeers } from '../../hooks/usePeers';
6
- export const VideosGrid = () => {
7
- const { localPeer, remotePeers } = usePeers();
8
- const videoTracks = parsePeersToTracks(localPeer, remotePeers);
9
- const keyExtractor = useCallback((item) => item.peerId, []);
10
- const renderItem = useCallback(({ item }) => <GridTrackItem peer={item}/>, []);
11
- return (<FlatList data={videoTracks} keyExtractor={keyExtractor} renderItem={renderItem} contentContainerStyle={styles.contentContainerStyle}/>);
12
- };
13
- const styles = StyleSheet.create({
14
- contentContainerStyle: {
15
- justifyContent: 'center',
16
- paddingHorizontal: 10,
17
- paddingVertical: 40,
18
- },
19
- });
20
- //# sourceMappingURL=VideosGrid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VideosGrid.js","sourceRoot":"","sources":["../../../src/components/FishjamRoom/VideosGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAsB,UAAU,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAa,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAE/D,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,IAAe,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,EAAE,IAAI,EAAiC,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG,EAC1E,EAAE,CACH,CAAC;IAEF,OAAO,CACL,CAAC,QAAQ,CACP,IAAI,CAAC,CAAC,WAAW,CAAC,CAClB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,qBAAqB,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,EACpD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,qBAAqB,EAAE;QACrB,cAAc,EAAE,QAAQ;QACxB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { useCallback } from 'react';\nimport { FlatList, ListRenderItemInfo, StyleSheet } from 'react-native';\n\nimport { GridTrack, GridTrackItem } from './GridTrackItem';\nimport { parsePeersToTracks } from './parsePeersToTracks';\nimport { usePeers } from '../../hooks/usePeers';\n\nexport const VideosGrid = () => {\n const { localPeer, remotePeers } = usePeers();\n const videoTracks = parsePeersToTracks(localPeer, remotePeers);\n\n const keyExtractor = useCallback((item: GridTrack) => item.peerId, []);\n const renderItem = useCallback(\n ({ item }: ListRenderItemInfo<GridTrack>) => <GridTrackItem peer={item} />,\n [],\n );\n\n return (\n <FlatList<GridTrack>\n data={videoTracks}\n keyExtractor={keyExtractor}\n renderItem={renderItem}\n contentContainerStyle={styles.contentContainerStyle}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n contentContainerStyle: {\n justifyContent: 'center',\n paddingHorizontal: 10,\n paddingVertical: 40,\n },\n});\n"]}
@@ -1,33 +0,0 @@
1
- export type FishjamRoomProps = {
2
- /**
3
- * ID of your fishjam instance
4
- */
5
- fishjamId: string;
6
- /**
7
- * Peer Token
8
- */
9
- peerToken: string;
10
- };
11
- /**
12
- * Simple component that enables your camera and show all tracks
13
- *
14
- * Example usage:
15
- * ```tsx
16
- * import { FishjamRoom } from '@fishjam-cloud/react-native-client';
17
- * import React from 'react';
18
- *
19
- * const FISHJAM_ID = 'your-fishjam_id';
20
- * const PEER_TOKEN = 'your-peer-token';
21
- *
22
- * <FishjamRoom
23
- * fishjamId={FISHJAM_ID}
24
- * peerToken={PEER_TOKEN}
25
- * />
26
- * ```
27
- * @category Components
28
- * @param {object} props
29
- * @param {string} props.fishjamId
30
- * @param {string} props.peerToken
31
- */
32
- export declare const FishjamRoom: ({ fishjamId, peerToken }: FishjamRoomProps) => import("react").JSX.Element;
33
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FishjamRoom/index.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,GAAI,0BAA0B,gBAAgB,gCA2BrE,CAAC"}
@@ -1,52 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { useCamera } from '../../hooks/useCamera';
3
- import { useConnection } from '../../hooks/useConnection';
4
- import { VideosGrid } from './VideosGrid';
5
- import { SafeAreaView } from 'react-native';
6
- /**
7
- * Simple component that enables your camera and show all tracks
8
- *
9
- * Example usage:
10
- * ```tsx
11
- * import { FishjamRoom } from '@fishjam-cloud/react-native-client';
12
- * import React from 'react';
13
- *
14
- * const FISHJAM_ID = 'your-fishjam_id';
15
- * const PEER_TOKEN = 'your-peer-token';
16
- *
17
- * <FishjamRoom
18
- * fishjamId={FISHJAM_ID}
19
- * peerToken={PEER_TOKEN}
20
- * />
21
- * ```
22
- * @category Components
23
- * @param {object} props
24
- * @param {string} props.fishjamId
25
- * @param {string} props.peerToken
26
- */
27
- export const FishjamRoom = ({ fishjamId, peerToken }) => {
28
- const { prepareCamera } = useCamera();
29
- const { leaveRoom, joinRoom } = useConnection();
30
- useEffect(() => {
31
- const join = async () => {
32
- try {
33
- await prepareCamera({
34
- quality: 'HD169',
35
- cameraEnabled: true,
36
- });
37
- await joinRoom({ fishjamId, peerToken });
38
- }
39
- catch (e) {
40
- console.warn(e);
41
- }
42
- };
43
- join();
44
- return () => {
45
- leaveRoom();
46
- };
47
- }, [fishjamId, peerToken, prepareCamera, joinRoom, leaveRoom]);
48
- return (<SafeAreaView>
49
- <VideosGrid />
50
- </SafeAreaView>);
51
- };
52
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FishjamRoom/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAa5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAoB,EAAE,EAAE;IACxE,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAAC;IACtC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;YACtB,IAAI,CAAC;gBACH,MAAM,aAAa,CAAC;oBAClB,OAAO,EAAE,OAAO;oBAChB,aAAa,EAAE,IAAI;iBACpB,CAAC,CAAC;gBACH,MAAM,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;YAC3C,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,CAAC;QACF,IAAI,EAAE,CAAC;QACP,OAAO,GAAG,EAAE;YACV,SAAS,EAAE,CAAC;QACd,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAE/D,OAAO,CACL,CAAC,YAAY,CACX;MAAA,CAAC,UAAU,CAAC,AAAD,EACb;IAAA,EAAE,YAAY,CAAC,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useEffect } from 'react';\nimport { useCamera } from '../../hooks/useCamera';\nimport { useConnection } from '../../hooks/useConnection';\nimport { VideosGrid } from './VideosGrid';\nimport { SafeAreaView } from 'react-native';\n\nexport type FishjamRoomProps = {\n /**\n * ID of your fishjam instance\n */\n fishjamId: string;\n /**\n * Peer Token\n */\n peerToken: string;\n};\n\n/**\n * Simple component that enables your camera and show all tracks\n *\n * Example usage:\n * ```tsx\n * import { FishjamRoom } from '@fishjam-cloud/react-native-client';\n * import React from 'react';\n *\n * const FISHJAM_ID = 'your-fishjam_id';\n * const PEER_TOKEN = 'your-peer-token';\n *\n * <FishjamRoom\n * fishjamId={FISHJAM_ID}\n * peerToken={PEER_TOKEN}\n * />\n * ```\n * @category Components\n * @param {object} props\n * @param {string} props.fishjamId\n * @param {string} props.peerToken\n */\nexport const FishjamRoom = ({ fishjamId, peerToken }: FishjamRoomProps) => {\n const { prepareCamera } = useCamera();\n const { leaveRoom, joinRoom } = useConnection();\n\n useEffect(() => {\n const join = async () => {\n try {\n await prepareCamera({\n quality: 'HD169',\n cameraEnabled: true,\n });\n await joinRoom({ fishjamId, peerToken });\n } catch (e) {\n console.warn(e);\n }\n };\n join();\n return () => {\n leaveRoom();\n };\n }, [fishjamId, peerToken, prepareCamera, joinRoom, leaveRoom]);\n\n return (\n <SafeAreaView>\n <VideosGrid />\n </SafeAreaView>\n );\n};\n"]}
@@ -1,4 +0,0 @@
1
- import { PeerWithTracks } from '../../hooks/usePeers';
2
- import { GridTrack } from './GridTrackItem';
3
- export declare const parsePeersToTracks: (localPeer: PeerWithTracks | null, remotePeers: PeerWithTracks[]) => GridTrack[];
4
- //# sourceMappingURL=parsePeersToTracks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsePeersToTracks.d.ts","sourceRoot":"","sources":["../../../src/components/FishjamRoom/parsePeersToTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAwC5C,eAAO,MAAM,kBAAkB,GAC7B,WAAW,cAAc,GAAG,IAAI,EAChC,aAAa,cAAc,EAAE,KAC5B,SAAS,EAGX,CAAC"}
@@ -1,37 +0,0 @@
1
- const createGridTracksFromPeer = (peer) => {
2
- const tracks = [];
3
- if (peer.cameraTrack && peer.cameraTrack.isActive) {
4
- tracks.push({
5
- track: peer.cameraTrack,
6
- peerId: peer.id,
7
- isLocal: peer.isLocal,
8
- isVadActive: peer.microphoneTrack?.vadStatus === 'speech',
9
- aspectRatio: peer.cameraTrack.aspectRatio,
10
- });
11
- }
12
- if (peer.screenShareVideoTrack && peer.screenShareVideoTrack.isActive) {
13
- tracks.push({
14
- track: peer.screenShareVideoTrack,
15
- peerId: peer.id,
16
- isLocal: peer.isLocal,
17
- isVadActive: peer.screenShareAudioTrack?.vadStatus === 'speech',
18
- aspectRatio: peer.screenShareVideoTrack.aspectRatio,
19
- });
20
- }
21
- if (tracks.length === 0) {
22
- tracks.push({
23
- track: null,
24
- peerId: peer.id,
25
- isLocal: peer.isLocal,
26
- isVadActive: peer.microphoneTrack?.vadStatus === 'speech' ||
27
- peer.screenShareAudioTrack?.vadStatus === 'speech',
28
- aspectRatio: null,
29
- });
30
- }
31
- return tracks;
32
- };
33
- export const parsePeersToTracks = (localPeer, remotePeers) => [
34
- ...(localPeer ? createGridTracksFromPeer(localPeer) : []),
35
- ...remotePeers.flatMap(createGridTracksFromPeer),
36
- ];
37
- //# sourceMappingURL=parsePeersToTracks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsePeersToTracks.js","sourceRoot":"","sources":["../../../src/components/FishjamRoom/parsePeersToTracks.ts"],"names":[],"mappings":"AAGA,MAAM,wBAAwB,GAAG,CAAC,IAAoB,EAAe,EAAE;IACrE,MAAM,MAAM,GAAgB,EAAE,CAAC;IAE/B,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAClD,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,KAAK,QAAQ;YACzD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW;SAC1C,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,IAAI,CAAC,qBAAqB;YACjC,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,KAAK,QAAQ;YAC/D,WAAW,EAAE,IAAI,CAAC,qBAAqB,CAAC,WAAW;SACpD,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EACT,IAAI,CAAC,eAAe,EAAE,SAAS,KAAK,QAAQ;gBAC5C,IAAI,CAAC,qBAAqB,EAAE,SAAS,KAAK,QAAQ;YACpD,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,SAAgC,EAChC,WAA6B,EAChB,EAAE,CAAC;IAChB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,GAAG,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC;CACjD,CAAC","sourcesContent":["import { PeerWithTracks } from '../../hooks/usePeers';\nimport { GridTrack } from './GridTrackItem';\n\nconst createGridTracksFromPeer = (peer: PeerWithTracks): GridTrack[] => {\n const tracks: GridTrack[] = [];\n\n if (peer.cameraTrack && peer.cameraTrack.isActive) {\n tracks.push({\n track: peer.cameraTrack,\n peerId: peer.id,\n isLocal: peer.isLocal,\n isVadActive: peer.microphoneTrack?.vadStatus === 'speech',\n aspectRatio: peer.cameraTrack.aspectRatio,\n });\n }\n\n if (peer.screenShareVideoTrack && peer.screenShareVideoTrack.isActive) {\n tracks.push({\n track: peer.screenShareVideoTrack,\n peerId: peer.id,\n isLocal: peer.isLocal,\n isVadActive: peer.screenShareAudioTrack?.vadStatus === 'speech',\n aspectRatio: peer.screenShareVideoTrack.aspectRatio,\n });\n }\n\n if (tracks.length === 0) {\n tracks.push({\n track: null,\n peerId: peer.id,\n isLocal: peer.isLocal,\n isVadActive:\n peer.microphoneTrack?.vadStatus === 'speech' ||\n peer.screenShareAudioTrack?.vadStatus === 'speech',\n aspectRatio: null,\n });\n }\n\n return tracks;\n};\n\nexport const parsePeersToTracks = (\n localPeer: PeerWithTracks | null,\n remotePeers: PeerWithTracks[],\n): GridTrack[] => [\n ...(localPeer ? createGridTracksFromPeer(localPeer) : []),\n ...remotePeers.flatMap(createGridTracksFromPeer),\n];\n"]}
@@ -1,48 +0,0 @@
1
- import * as React from 'react';
2
- import { ViewProps } from 'react-native';
3
- export type PictureInPictureConfig = {
4
- startAutomatically?: boolean;
5
- stopAutomatically?: boolean;
6
- allowsCameraInBackground?: boolean;
7
- primaryPlaceholderText?: string;
8
- secondaryPlaceholderText?: string;
9
- };
10
- export interface PipContainerViewProps extends ViewProps {
11
- startAutomatically?: boolean;
12
- stopAutomatically?: boolean;
13
- allowsCameraInBackground?: boolean;
14
- primaryPlaceholderText?: string;
15
- secondaryPlaceholderText?: string;
16
- }
17
- export interface PipContainerViewRef {
18
- startPictureInPicture(): Promise<void>;
19
- stopPictureInPicture(): Promise<void>;
20
- }
21
- /**
22
- * A view component for Picture-in-Picture functionality with split-screen layout.
23
- *
24
- * Automatically displays:
25
- * - Primary view (left): Local camera track or placeholder text
26
- * - Secondary view (right): Remote track with active VAD (voice activity) or placeholder text
27
- *
28
- * Use a ref to call methods on this component:
29
- * ```js
30
- * const pipRef = useRef<PipContainerViewRef>(null);
31
- *
32
- * // Start PiP manually (if startAutomatically is false)
33
- * await pipRef.current?.startPictureInPicture();
34
- *
35
- * // Stop PiP manually
36
- * await pipRef.current?.stopPictureInPicture();
37
- * ```
38
- *
39
- * @param startAutomatically - Whether to start PiP automatically when app goes to background (default: true)
40
- * @param stopAutomatically - Whether to stop PiP automatically when app comes to foreground (default: true)
41
- * @param allowsCameraInBackground - Whether to allow camera to continue running in PiP mode (default: false, iOS only)
42
- * @param primaryPlaceholderText - Text to display when local camera is unavailable (default: "No camera")
43
- * @param secondaryPlaceholderText - Text to display when no remote speaker is active (default: "No active speaker")
44
- *
45
- * @category Components
46
- */
47
- export declare const PipContainerView: React.ForwardRefExoticComponent<PipContainerViewProps & React.RefAttributes<PipContainerViewRef>>;
48
- //# sourceMappingURL=PipContainerView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PipContainerView.d.ts","sourceRoot":"","sources":["../../src/components/PipContainerView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,mGAM3B,CAAC"}
@@ -1,34 +0,0 @@
1
- import { requireNativeViewManager } from 'expo-modules-core';
2
- import * as React from 'react';
3
- const NativeView = requireNativeViewManager('PipContainerViewModule');
4
- /**
5
- * A view component for Picture-in-Picture functionality with split-screen layout.
6
- *
7
- * Automatically displays:
8
- * - Primary view (left): Local camera track or placeholder text
9
- * - Secondary view (right): Remote track with active VAD (voice activity) or placeholder text
10
- *
11
- * Use a ref to call methods on this component:
12
- * ```js
13
- * const pipRef = useRef<PipContainerViewRef>(null);
14
- *
15
- * // Start PiP manually (if startAutomatically is false)
16
- * await pipRef.current?.startPictureInPicture();
17
- *
18
- * // Stop PiP manually
19
- * await pipRef.current?.stopPictureInPicture();
20
- * ```
21
- *
22
- * @param startAutomatically - Whether to start PiP automatically when app goes to background (default: true)
23
- * @param stopAutomatically - Whether to stop PiP automatically when app comes to foreground (default: true)
24
- * @param allowsCameraInBackground - Whether to allow camera to continue running in PiP mode (default: false, iOS only)
25
- * @param primaryPlaceholderText - Text to display when local camera is unavailable (default: "No camera")
26
- * @param secondaryPlaceholderText - Text to display when no remote speaker is active (default: "No active speaker")
27
- *
28
- * @category Components
29
- */
30
- export const PipContainerView = React.forwardRef((props, ref) => (
31
- // @ts-expect-error - Expo modules API typing doesn't match React's ref typing
32
- <NativeView {...props} ref={ref}/>));
33
- PipContainerView.displayName = 'PipContainerView';
34
- //# sourceMappingURL=PipContainerView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PipContainerView.js","sourceRoot":"","sources":["../../src/components/PipContainerView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwB/B,MAAM,UAAU,GACd,wBAAwB,CAAwB,wBAAwB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAG9C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;AAChB,8EAA8E;AAC9E,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CACpC,CAAC,CAAC;AAEH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport { ViewProps } from 'react-native';\n\nexport type PictureInPictureConfig = {\n startAutomatically?: boolean;\n stopAutomatically?: boolean;\n allowsCameraInBackground?: boolean;\n primaryPlaceholderText?: string;\n secondaryPlaceholderText?: string;\n};\n\nexport interface PipContainerViewProps extends ViewProps {\n startAutomatically?: boolean;\n stopAutomatically?: boolean;\n allowsCameraInBackground?: boolean;\n primaryPlaceholderText?: string;\n secondaryPlaceholderText?: string;\n}\n\nexport interface PipContainerViewRef {\n startPictureInPicture(): Promise<void>;\n stopPictureInPicture(): Promise<void>;\n}\n\nconst NativeView: React.ComponentType<PipContainerViewProps> =\n requireNativeViewManager<PipContainerViewProps>('PipContainerViewModule');\n\n/**\n * A view component for Picture-in-Picture functionality with split-screen layout.\n *\n * Automatically displays:\n * - Primary view (left): Local camera track or placeholder text\n * - Secondary view (right): Remote track with active VAD (voice activity) or placeholder text\n *\n * Use a ref to call methods on this component:\n * ```js\n * const pipRef = useRef<PipContainerViewRef>(null);\n *\n * // Start PiP manually (if startAutomatically is false)\n * await pipRef.current?.startPictureInPicture();\n *\n * // Stop PiP manually\n * await pipRef.current?.stopPictureInPicture();\n * ```\n *\n * @param startAutomatically - Whether to start PiP automatically when app goes to background (default: true)\n * @param stopAutomatically - Whether to stop PiP automatically when app comes to foreground (default: true)\n * @param allowsCameraInBackground - Whether to allow camera to continue running in PiP mode (default: false, iOS only)\n * @param primaryPlaceholderText - Text to display when local camera is unavailable (default: \"No camera\")\n * @param secondaryPlaceholderText - Text to display when no remote speaker is active (default: \"No active speaker\")\n *\n * @category Components\n */\nexport const PipContainerView = React.forwardRef<\n PipContainerViewRef,\n PipContainerViewProps\n>((props, ref) => (\n // @ts-expect-error - Expo modules API typing doesn't match React's ref typing\n <NativeView {...props} ref={ref} />\n));\n\nPipContainerView.displayName = 'PipContainerView';\n"]}
@@ -1,28 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- import { VideoLayout } from '../types';
4
- import { CameraId } from '../hooks/useCamera';
5
- export type VideoPreviewViewProps = {
6
- /**
7
- * Video layout inside of the component
8
- * @default `FILL`
9
- */
10
- videoLayout?: VideoLayout;
11
- style?: StyleProp<ViewStyle>;
12
- /**
13
- * Id of the camera used for preview. Get available cameras with `cameras` property.
14
- * @default `the first front camera`
15
- */
16
- cameraId?: CameraId;
17
- };
18
- /**
19
- * Render camera preview.
20
- * Allows to display camera preview before streaming is started
21
- *
22
- *
23
- * @category Components
24
- * @param {object} props
25
- * @param {string} props.cameraId
26
- */
27
- export declare const VideoPreviewView: React.ForwardRefExoticComponent<VideoPreviewViewProps & React.RefAttributes<React.ComponentType<VideoPreviewViewProps>>>;
28
- //# sourceMappingURL=VideoPreviewView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VideoPreviewView.d.ts","sourceRoot":"","sources":["../../src/components/VideoPreviewView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAKF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,0HAM3B,CAAC"}
@@ -1,17 +0,0 @@
1
- import { requireNativeViewManager } from 'expo-modules-core';
2
- import * as React from 'react';
3
- const NativeView = requireNativeViewManager('VideoPreviewViewModule');
4
- /**
5
- * Render camera preview.
6
- * Allows to display camera preview before streaming is started
7
- *
8
- *
9
- * @category Components
10
- * @param {object} props
11
- * @param {string} props.cameraId
12
- */
13
- export const VideoPreviewView = React.forwardRef((props, ref) => (
14
- // @ts-expect-error ref prop needs to be updated
15
- <NativeView {...props} captureDeviceId={props.cameraId} ref={ref}/>));
16
- VideoPreviewView.displayName = 'VideoPreviewView';
17
- //# sourceMappingURL=VideoPreviewView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VideoPreviewView.js","sourceRoot":"","sources":["../../src/components/VideoPreviewView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,MAAM,UAAU,GACd,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAG9C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;AAChB,gDAAgD;AAChD,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CACrE,CAAC,CAAC;AAEH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { VideoLayout } from '../types';\nimport { CameraId } from '../hooks/useCamera';\n\nexport type VideoPreviewViewProps = {\n /**\n * Video layout inside of the component\n * @default `FILL`\n */\n videoLayout?: VideoLayout;\n\n style?: StyleProp<ViewStyle>;\n /**\n * Id of the camera used for preview. Get available cameras with `cameras` property.\n * @default `the first front camera`\n */\n cameraId?: CameraId;\n};\n\nconst NativeView: React.ComponentType<VideoPreviewViewProps> =\n requireNativeViewManager('VideoPreviewViewModule');\n\n/**\n * Render camera preview.\n * Allows to display camera preview before streaming is started\n *\n *\n * @category Components\n * @param {object} props\n * @param {string} props.cameraId\n */\nexport const VideoPreviewView = React.forwardRef<\n React.ComponentType<VideoPreviewViewProps>,\n VideoPreviewViewProps\n>((props, ref) => (\n // @ts-expect-error ref prop needs to be updated\n <NativeView {...props} captureDeviceId={props.cameraId} ref={ref} />\n));\n\nVideoPreviewView.displayName = 'VideoPreviewView';\n"]}