@fishjam-cloud/react-native-client 0.24.0 → 0.25.0-rc.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.
Files changed (266) 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 +44 -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/plugin/src/types.ts +19 -0
  35. package/plugin/src/withFishjam.ts +42 -0
  36. package/plugin/src/withFishjamAndroid.ts +112 -0
  37. package/plugin/src/withFishjamIos.ts +336 -0
  38. package/plugin/tsconfig.json +9 -0
  39. package/plugin/tsconfig.tsbuildinfo +1 -0
  40. package/LICENSE.txt +0 -201
  41. package/android/build.gradle +0 -95
  42. package/android/src/main/AndroidManifest.xml +0 -2
  43. package/android/src/main/java/io/fishjam/reactnative/AudioDeviceKind.kt +0 -34
  44. package/android/src/main/java/io/fishjam/reactnative/AudioSwitchManager.kt +0 -61
  45. package/android/src/main/java/io/fishjam/reactnative/EmitableEvents.kt +0 -126
  46. package/android/src/main/java/io/fishjam/reactnative/Errors.kt +0 -31
  47. package/android/src/main/java/io/fishjam/reactnative/PipContainerView.kt +0 -282
  48. package/android/src/main/java/io/fishjam/reactnative/PipContainerViewModule.kt +0 -41
  49. package/android/src/main/java/io/fishjam/reactnative/PipTrackSelector.kt +0 -98
  50. package/android/src/main/java/io/fishjam/reactnative/PipViewFactory.kt +0 -186
  51. package/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +0 -1001
  52. package/android/src/main/java/io/fishjam/reactnative/RNFishjamClientModule.kt +0 -358
  53. package/android/src/main/java/io/fishjam/reactnative/Utils.kt +0 -11
  54. package/android/src/main/java/io/fishjam/reactnative/VideoPreviewView.kt +0 -40
  55. package/android/src/main/java/io/fishjam/reactnative/VideoPreviewViewModule.kt +0 -22
  56. package/android/src/main/java/io/fishjam/reactnative/VideoRendererView.kt +0 -76
  57. package/android/src/main/java/io/fishjam/reactnative/VideoRendererViewModule.kt +0 -33
  58. package/android/src/main/java/io/fishjam/reactnative/VideoView.kt +0 -257
  59. package/android/src/main/java/io/fishjam/reactnative/extensions/CaptureDevice.kt +0 -17
  60. package/android/src/main/java/io/fishjam/reactnative/foregroundService/FishjamForegroundService.kt +0 -101
  61. package/android/src/main/java/io/fishjam/reactnative/foregroundService/ForegroundServiceManager.kt +0 -118
  62. package/android/src/main/java/io/fishjam/reactnative/foregroundService/ForegroundServiceState.kt +0 -46
  63. package/android/src/main/java/io/fishjam/reactnative/helpers/PictureInPictureHelperFragment.kt +0 -20
  64. package/android/src/main/java/io/fishjam/reactnative/managers/ListenerManager.kt +0 -24
  65. package/android/src/main/java/io/fishjam/reactnative/managers/LocalCameraTracksChangedListenersManager.kt +0 -8
  66. package/android/src/main/java/io/fishjam/reactnative/managers/LocalTracksSwitchListenersManager.kt +0 -17
  67. package/android/src/main/java/io/fishjam/reactnative/managers/TracksUpdateListenersManager.kt +0 -7
  68. package/android/src/main/java/io/fishjam/reactnative/utils/PermissionUtils.kt +0 -45
  69. package/build/RNFishjamClientModule.d.ts +0 -106
  70. package/build/RNFishjamClientModule.d.ts.map +0 -1
  71. package/build/RNFishjamClientModule.js +0 -21
  72. package/build/RNFishjamClientModule.js.map +0 -1
  73. package/build/common/metadata.d.ts +0 -9
  74. package/build/common/metadata.d.ts.map +0 -1
  75. package/build/common/metadata.js +0 -11
  76. package/build/common/metadata.js.map +0 -1
  77. package/build/components/FishjamRoom/GridTrackItem.d.ts +0 -12
  78. package/build/components/FishjamRoom/GridTrackItem.d.ts.map +0 -1
  79. package/build/components/FishjamRoom/GridTrackItem.js +0 -56
  80. package/build/components/FishjamRoom/GridTrackItem.js.map +0 -1
  81. package/build/components/FishjamRoom/VideosGrid.d.ts +0 -3
  82. package/build/components/FishjamRoom/VideosGrid.d.ts.map +0 -1
  83. package/build/components/FishjamRoom/VideosGrid.js +0 -20
  84. package/build/components/FishjamRoom/VideosGrid.js.map +0 -1
  85. package/build/components/FishjamRoom/index.d.ts +0 -33
  86. package/build/components/FishjamRoom/index.d.ts.map +0 -1
  87. package/build/components/FishjamRoom/index.js +0 -52
  88. package/build/components/FishjamRoom/index.js.map +0 -1
  89. package/build/components/FishjamRoom/parsePeersToTracks.d.ts +0 -4
  90. package/build/components/FishjamRoom/parsePeersToTracks.d.ts.map +0 -1
  91. package/build/components/FishjamRoom/parsePeersToTracks.js +0 -37
  92. package/build/components/FishjamRoom/parsePeersToTracks.js.map +0 -1
  93. package/build/components/PipContainerView.d.ts +0 -48
  94. package/build/components/PipContainerView.d.ts.map +0 -1
  95. package/build/components/PipContainerView.js +0 -34
  96. package/build/components/PipContainerView.js.map +0 -1
  97. package/build/components/VideoPreviewView.d.ts +0 -28
  98. package/build/components/VideoPreviewView.d.ts.map +0 -1
  99. package/build/components/VideoPreviewView.js +0 -17
  100. package/build/components/VideoPreviewView.js.map +0 -1
  101. package/build/components/VideoRendererView.d.ts +0 -39
  102. package/build/components/VideoRendererView.d.ts.map +0 -1
  103. package/build/components/VideoRendererView.js +0 -25
  104. package/build/components/VideoRendererView.js.map +0 -1
  105. package/build/consts/index.d.ts +0 -5
  106. package/build/consts/index.d.ts.map +0 -1
  107. package/build/consts/index.js +0 -8
  108. package/build/consts/index.js.map +0 -1
  109. package/build/debug/common/webRTC.d.ts +0 -9
  110. package/build/debug/common/webRTC.d.ts.map +0 -1
  111. package/build/debug/common/webRTC.js +0 -11
  112. package/build/debug/common/webRTC.js.map +0 -1
  113. package/build/debug/index.d.ts +0 -4
  114. package/build/debug/index.d.ts.map +0 -1
  115. package/build/debug/index.js +0 -3
  116. package/build/debug/index.js.map +0 -1
  117. package/build/debug/stats/types.d.ts +0 -55
  118. package/build/debug/stats/types.d.ts.map +0 -1
  119. package/build/debug/stats/types.js +0 -2
  120. package/build/debug/stats/types.js.map +0 -1
  121. package/build/debug/stats/useRTCStatistics.d.ts +0 -9
  122. package/build/debug/stats/useRTCStatistics.d.ts.map +0 -1
  123. package/build/debug/stats/useRTCStatistics.js +0 -79
  124. package/build/debug/stats/useRTCStatistics.js.map +0 -1
  125. package/build/hooks/internal/useFishjamEvent.d.ts +0 -4
  126. package/build/hooks/internal/useFishjamEvent.d.ts.map +0 -1
  127. package/build/hooks/internal/useFishjamEvent.js +0 -38
  128. package/build/hooks/internal/useFishjamEvent.js.map +0 -1
  129. package/build/hooks/internal/useFishjamEventState.d.ts +0 -3
  130. package/build/hooks/internal/useFishjamEventState.d.ts.map +0 -1
  131. package/build/hooks/internal/useFishjamEventState.js +0 -18
  132. package/build/hooks/internal/useFishjamEventState.js.map +0 -1
  133. package/build/hooks/useAppScreenShare.d.ts +0 -18
  134. package/build/hooks/useAppScreenShare.d.ts.map +0 -1
  135. package/build/hooks/useAppScreenShare.js +0 -46
  136. package/build/hooks/useAppScreenShare.js.map +0 -1
  137. package/build/hooks/useAudioSettings.d.ts +0 -49
  138. package/build/hooks/useAudioSettings.d.ts.map +0 -1
  139. package/build/hooks/useAudioSettings.js +0 -70
  140. package/build/hooks/useAudioSettings.js.map +0 -1
  141. package/build/hooks/useBandwidthEstimation.d.ts +0 -14
  142. package/build/hooks/useBandwidthEstimation.d.ts.map +0 -1
  143. package/build/hooks/useBandwidthEstimation.js +0 -19
  144. package/build/hooks/useBandwidthEstimation.js.map +0 -1
  145. package/build/hooks/useCallKit.d.ts +0 -121
  146. package/build/hooks/useCallKit.d.ts.map +0 -1
  147. package/build/hooks/useCallKit.js +0 -142
  148. package/build/hooks/useCallKit.js.map +0 -1
  149. package/build/hooks/useCamera.d.ts +0 -113
  150. package/build/hooks/useCamera.d.ts.map +0 -1
  151. package/build/hooks/useCamera.js +0 -93
  152. package/build/hooks/useCamera.js.map +0 -1
  153. package/build/hooks/useConnection.d.ts +0 -73
  154. package/build/hooks/useConnection.d.ts.map +0 -1
  155. package/build/hooks/useConnection.js +0 -46
  156. package/build/hooks/useConnection.js.map +0 -1
  157. package/build/hooks/useForegroundService.d.ts.map +0 -1
  158. package/build/hooks/useForegroundService.js +0 -66
  159. package/build/hooks/useForegroundService.js.map +0 -1
  160. package/build/hooks/useMicrophone.d.ts +0 -16
  161. package/build/hooks/useMicrophone.d.ts.map +0 -1
  162. package/build/hooks/useMicrophone.js +0 -31
  163. package/build/hooks/useMicrophone.js.map +0 -1
  164. package/build/hooks/usePeerStatus.d.ts +0 -10
  165. package/build/hooks/usePeerStatus.d.ts.map +0 -1
  166. package/build/hooks/usePeerStatus.js +0 -13
  167. package/build/hooks/usePeerStatus.js.map +0 -1
  168. package/build/hooks/usePeers.d.ts +0 -98
  169. package/build/hooks/usePeers.d.ts.map +0 -1
  170. package/build/hooks/usePeers.js +0 -81
  171. package/build/hooks/usePeers.js.map +0 -1
  172. package/build/hooks/usePermissions.d.ts +0 -24
  173. package/build/hooks/usePermissions.d.ts.map +0 -1
  174. package/build/hooks/usePermissions.js +0 -61
  175. package/build/hooks/usePermissions.js.map +0 -1
  176. package/build/hooks/useReconnection.d.ts +0 -11
  177. package/build/hooks/useReconnection.d.ts.map +0 -1
  178. package/build/hooks/useReconnection.js +0 -14
  179. package/build/hooks/useReconnection.js.map +0 -1
  180. package/build/hooks/useSandbox.d.ts +0 -20
  181. package/build/hooks/useSandbox.d.ts.map +0 -1
  182. package/build/hooks/useSandbox.js +0 -54
  183. package/build/hooks/useSandbox.js.map +0 -1
  184. package/build/hooks/useScreenShare.d.ts +0 -36
  185. package/build/hooks/useScreenShare.d.ts.map +0 -1
  186. package/build/hooks/useScreenShare.js +0 -45
  187. package/build/hooks/useScreenShare.js.map +0 -1
  188. package/build/hooks/useUpdatePeerMetadata.d.ts +0 -15
  189. package/build/hooks/useUpdatePeerMetadata.d.ts.map +0 -1
  190. package/build/hooks/useUpdatePeerMetadata.js +0 -21
  191. package/build/hooks/useUpdatePeerMetadata.js.map +0 -1
  192. package/build/index.d.ts +0 -36
  193. package/build/index.d.ts.map +0 -1
  194. package/build/index.js +0 -30
  195. package/build/index.js.map +0 -1
  196. package/build/livestream/components/LivestreamStreamer.d.ts +0 -24
  197. package/build/livestream/components/LivestreamStreamer.d.ts.map +0 -1
  198. package/build/livestream/components/LivestreamStreamer.js +0 -12
  199. package/build/livestream/components/LivestreamStreamer.js.map +0 -1
  200. package/build/livestream/components/LivestreamViewer.d.ts +0 -46
  201. package/build/livestream/components/LivestreamViewer.d.ts.map +0 -1
  202. package/build/livestream/components/LivestreamViewer.js +0 -10
  203. package/build/livestream/components/LivestreamViewer.js.map +0 -1
  204. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts +0 -49
  205. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.d.ts.map +0 -1
  206. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js +0 -58
  207. package/build/livestream/hooks/useLivestreamScreenSharingStreamer.js.map +0 -1
  208. package/build/livestream/hooks/useLivestreamStreamer.d.ts +0 -65
  209. package/build/livestream/hooks/useLivestreamStreamer.d.ts.map +0 -1
  210. package/build/livestream/hooks/useLivestreamStreamer.js +0 -71
  211. package/build/livestream/hooks/useLivestreamStreamer.js.map +0 -1
  212. package/build/livestream/hooks/useLivestreamViewer.d.ts +0 -36
  213. package/build/livestream/hooks/useLivestreamViewer.d.ts.map +0 -1
  214. package/build/livestream/hooks/useLivestreamViewer.js +0 -73
  215. package/build/livestream/hooks/useLivestreamViewer.js.map +0 -1
  216. package/build/livestream/index.d.ts +0 -12
  217. package/build/livestream/index.d.ts.map +0 -1
  218. package/build/livestream/index.js +0 -7
  219. package/build/livestream/index.js.map +0 -1
  220. package/build/protos/fishjam/peer_notifications.d.ts +0 -63
  221. package/build/protos/fishjam/peer_notifications.d.ts.map +0 -1
  222. package/build/protos/fishjam/peer_notifications.js +0 -235
  223. package/build/protos/fishjam/peer_notifications.js.map +0 -1
  224. package/build/types.d.ts +0 -34
  225. package/build/types.d.ts.map +0 -1
  226. package/build/types.js +0 -2
  227. package/build/types.js.map +0 -1
  228. package/build/utils/config.d.ts +0 -6
  229. package/build/utils/config.d.ts.map +0 -1
  230. package/build/utils/config.js +0 -10
  231. package/build/utils/config.js.map +0 -1
  232. package/build/utils/errorListener.d.ts +0 -2
  233. package/build/utils/errorListener.d.ts.map +0 -1
  234. package/build/utils/errorListener.js +0 -15
  235. package/build/utils/errorListener.js.map +0 -1
  236. package/build/utils/eventPayloadValidator.d.ts +0 -3
  237. package/build/utils/eventPayloadValidator.d.ts.map +0 -1
  238. package/build/utils/eventPayloadValidator.js +0 -86
  239. package/build/utils/eventPayloadValidator.js.map +0 -1
  240. package/build/utils/getFishjamUrl.d.ts +0 -2
  241. package/build/utils/getFishjamUrl.d.ts.map +0 -1
  242. package/build/utils/getFishjamUrl.js +0 -10
  243. package/build/utils/getFishjamUrl.js.map +0 -1
  244. package/debug/package.json +0 -4
  245. package/expo-module.config.json +0 -19
  246. package/ios/CameraPermissionsRequester.swift +0 -117
  247. package/ios/Events.swift +0 -152
  248. package/ios/PictureInPictureManager.swift +0 -215
  249. package/ios/PipContainerView.swift +0 -56
  250. package/ios/PipContainerViewModule.swift +0 -48
  251. package/ios/RNFishjamClient.podspec +0 -30
  252. package/ios/RNFishjamClient.swift +0 -995
  253. package/ios/RNFishjamClientModule.swift +0 -289
  254. package/ios/RNFishjamProxy.swift +0 -12
  255. package/ios/Utils/PermissionUtils.swift +0 -16
  256. package/ios/Utils.swift +0 -23
  257. package/ios/VideoPreviewView.swift +0 -54
  258. package/ios/VideoPreviewViewModule.swift +0 -21
  259. package/ios/VideoRendererView.swift +0 -98
  260. package/ios/VideoRendererViewModule.swift +0 -23
  261. package/ios/extensions/AVCaptureDevice.swift +0 -20
  262. package/ios/managers/LocalCameraTracksChangedListenersManager.swift +0 -23
  263. package/ios/managers/TracksUpdateListenersManager.swift +0 -21
  264. package/livestream/package.json +0 -4
  265. package/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift +0 -50
  266. /package/plugin/broadcastExtensionFiles/{FishjamScreenBroadcastExtension.entitlements → ScreenBroadcastExtension.entitlements} +0 -0
@@ -1,65 +0,0 @@
1
- import { Camera, SenderAudioCodecName, SenderVideoCodecName, VideoParameters, WhipClientViewRef } from 'react-native-whip-whep';
2
- /**
3
- * @category Livestream
4
- */
5
- export interface useLivestreamStreamerResult {
6
- /**
7
- * Callback used to start publishing the selected audio and video media streams.
8
- *
9
- * @remarks
10
- * Calling {@link connect} multiple times will have the effect of only publishing the **last** specified inputs.
11
- */
12
- connect: (token: string, urlOverride?: string) => Promise<void>;
13
- /** Callback to stop publishing anything previously published with {@link connect} */
14
- disconnect: () => Promise<void>;
15
- /** Callback to flip camera */
16
- flipCamera: () => Promise<void>;
17
- /** Callback to switch camera to the one passed as arguement */
18
- switchCamera: (deviceId: string) => Promise<void>;
19
- /** Callback to get the id of camera which is used for streaming */
20
- currentCameraDeviceId: () => Promise<string | undefined>;
21
- /** Utility flag which indicates the current connection status */
22
- isConnected: boolean;
23
- /**
24
- * Reference to the WhipClient instance. Needs to be passed to the {@link LivestreamStreamer} component.
25
- */
26
- whipClientRef: React.RefObject<WhipClientViewRef | null>;
27
- }
28
- export type UseLivestreamStreamerParams = {
29
- /**
30
- * If video track should be enabled.
31
- * Defaults to true.
32
- */
33
- videoEnabled?: boolean;
34
- /**
35
- * If audio track should be enabled.
36
- * Defaults to true.
37
- */
38
- audioEnabled?: boolean;
39
- /**
40
- * Camera to use for the livestream.
41
- * Use {@link cameras} to get the list of supported cameras.
42
- */
43
- camera?: Camera;
44
- /**
45
- * Set video parameters for the camera
46
- */
47
- videoParameters?: VideoParameters;
48
- /**
49
- * Set the preferred video codecs for sending the video.
50
- * Use {@link WhipClient.getSupportedVideoCodecs} to get the list of supported video codecs.
51
- */
52
- preferredVideoCodecs?: SenderVideoCodecName[];
53
- /**
54
- * Set the preferred audio codecs for sending the audio.
55
- * Use {@link WhipClient.getSupportedAudioCodecs} to get the list of supported audio codecs.
56
- */
57
- preferredAudioCodecs?: SenderAudioCodecName[];
58
- };
59
- /**
60
- * Hook for publishing a livestream, which can be then received with {@link useLivestreamViewer}
61
- * @category Livestream
62
- * @group Hooks
63
- */
64
- export declare const useLivestreamStreamer: ({ videoEnabled, audioEnabled, camera, videoParameters, preferredVideoCodecs, preferredAudioCodecs, }?: UseLivestreamStreamerParams) => useLivestreamStreamerResult;
65
- //# sourceMappingURL=useLivestreamStreamer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLivestreamStreamer.d.ts","sourceRoot":"","sources":["../../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@
1
- import { useCallback, useRef, useEffect } from 'react';
2
- import { cameras, useWhipConnectionState, } from 'react-native-whip-whep';
3
- import { FISHJAM_WHIP_URL } from '../../consts';
4
- /**
5
- * Hook for publishing a livestream, which can be then received with {@link useLivestreamViewer}
6
- * @category Livestream
7
- * @group Hooks
8
- */
9
- export const useLivestreamStreamer = ({ videoEnabled, audioEnabled, camera, videoParameters, preferredVideoCodecs, preferredAudioCodecs, } = {}) => {
10
- const state = useWhipConnectionState();
11
- const isConnected = state === 'connected';
12
- const whipClientRef = useRef(null);
13
- const connect = useCallback(async (token, urlOverride) => {
14
- const resolvedUrl = urlOverride ?? FISHJAM_WHIP_URL;
15
- await whipClientRef.current?.connect({
16
- authToken: token,
17
- serverUrl: resolvedUrl,
18
- });
19
- }, []);
20
- const disconnect = useCallback(async () => {
21
- await whipClientRef.current?.disconnect();
22
- }, []);
23
- const flipCamera = useCallback(async () => {
24
- await whipClientRef.current?.flipCamera();
25
- }, []);
26
- const switchCamera = useCallback(async (deviceId) => {
27
- return await whipClientRef.current?.switchCamera(deviceId);
28
- }, []);
29
- const currentCameraDeviceId = useCallback(async () => {
30
- return await whipClientRef.current?.currentCameraDeviceId();
31
- }, []);
32
- useEffect(() => {
33
- try {
34
- const initializeCamera = async () => {
35
- await whipClientRef.current?.initializeCamera({
36
- audioEnabled: audioEnabled ?? true,
37
- videoEnabled: videoEnabled ?? true,
38
- videoParameters: videoParameters,
39
- preferredVideoCodecs: preferredVideoCodecs,
40
- preferredAudioCodecs: preferredAudioCodecs,
41
- }, camera?.id ?? cameras[0].id);
42
- };
43
- initializeCamera();
44
- }
45
- catch {
46
- console.error('Failed to initialize camera');
47
- }
48
- const ref = whipClientRef.current;
49
- return () => {
50
- ref?.disconnect();
51
- };
52
- }, [
53
- camera,
54
- videoParameters,
55
- videoEnabled,
56
- audioEnabled,
57
- preferredVideoCodecs,
58
- preferredAudioCodecs,
59
- whipClientRef,
60
- ]);
61
- return {
62
- connect,
63
- disconnect,
64
- flipCamera,
65
- switchCamera,
66
- currentCameraDeviceId,
67
- isConnected,
68
- whipClientRef,
69
- };
70
- };
71
- //# sourceMappingURL=useLivestreamStreamer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLivestreamStreamer.js","sourceRoot":"","sources":["../../../src/livestream/hooks/useLivestreamStreamer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAEL,OAAO,EAKP,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AA6DhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,eAAe,EACf,oBAAoB,EACpB,oBAAoB,MACW,EAAE,EAA+B,EAAE;IAClE,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IACvC,MAAM,WAAW,GAAG,KAAK,KAAK,WAAW,CAAC;IAE1C,MAAM,aAAa,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,KAAa,EAAE,WAAoB,EAAE,EAAE;QACxE,MAAM,WAAW,GAAG,WAAW,IAAI,gBAAgB,CAAC;QACpD,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC;YACnC,SAAS,EAAE,KAAK;YAChB,SAAS,EAAE,WAAW;SACvB,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxC,MAAM,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC;IAC5C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxC,MAAM,aAAa,CAAC,OAAO,EAAE,UA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B,WAAW;QACX,aAAa;KACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useCallback, useRef, useEffect } from 'react';\nimport {\n Camera,\n cameras,\n SenderAudioCodecName,\n SenderVideoCodecName,\n VideoParameters,\n WhipClientViewRef,\n useWhipConnectionState,\n} from 'react-native-whip-whep';\nimport { FISHJAM_WHIP_URL } from '../../consts';\n\n/**\n * @category Livestream\n */\nexport interface useLivestreamStreamerResult {\n /**\n * Callback used to start publishing the selected audio and video media streams.\n *\n * @remarks\n * Calling {@link connect} multiple times will have the effect of only publishing the **last** specified inputs.\n */\n connect: (token: string, urlOverride?: string) => Promise<void>;\n /** Callback to stop publishing anything previously published with {@link connect} */\n disconnect: () => Promise<void>;\n /** Callback to flip camera */\n flipCamera: () => Promise<void>;\n /** Callback to switch camera to the one passed as arguement */\n switchCamera: (deviceId: string) => Promise<void>;\n /** Callback to get the id of camera which is used for streaming */\n currentCameraDeviceId: () => Promise<string | undefined>;\n /** Utility flag which indicates the current connection status */\n isConnected: boolean;\n /**\n * Reference to the WhipClient instance. Needs to be passed to the {@link LivestreamStreamer} component.\n */\n whipClientRef: React.RefObject<WhipClientViewRef | null>;\n}\n\nexport type UseLivestreamStreamerParams = {\n /**\n * If video track should be enabled.\n * Defaults to true.\n */\n videoEnabled?: boolean;\n /**\n * If audio track should be enabled.\n * Defaults to true.\n */\n audioEnabled?: boolean;\n /**\n * Camera to use for the livestream.\n * Use {@link cameras} to get the list of supported cameras.\n */\n camera?: Camera;\n /**\n * Set video parameters for the camera\n */\n videoParameters?: VideoParameters;\n /**\n * Set the preferred video codecs for sending the video.\n * Use {@link WhipClient.getSupportedVideoCodecs} to get the list of supported video codecs.\n */\n preferredVideoCodecs?: SenderVideoCodecName[];\n /**\n * Set the preferred audio codecs for sending the audio.\n * Use {@link WhipClient.getSupportedAudioCodecs} to get the list of supported audio codecs.\n */\n preferredAudioCodecs?: SenderAudioCodecName[];\n};\n\n/**\n * Hook for publishing a livestream, which can be then received with {@link useLivestreamViewer}\n * @category Livestream\n * @group Hooks\n */\nexport const useLivestreamStreamer = ({\n videoEnabled,\n audioEnabled,\n camera,\n videoParameters,\n preferredVideoCodecs,\n preferredAudioCodecs,\n}: UseLivestreamStreamerParams = {}): useLivestreamStreamerResult => {\n const state = useWhipConnectionState();\n const isConnected = state === 'connected';\n\n const whipClientRef = useRef<WhipClientViewRef | null>(null);\n\n const connect = useCallback(async (token: string, urlOverride?: string) => {\n const resolvedUrl = urlOverride ?? FISHJAM_WHIP_URL;\n await whipClientRef.current?.connect({\n authToken: token,\n serverUrl: resolvedUrl,\n });\n }, []);\n\n const disconnect = useCallback(async () => {\n await whipClientRef.current?.disconnect();\n }, []);\n\n const flipCamera = useCallback(async () => {\n await whipClientRef.current?.flipCamera();\n }, []);\n\n const switchCamera = useCallback(async (deviceId: string) => {\n return await whipClientRef.current?.switchCamera(deviceId);\n }, []);\n\n const currentCameraDeviceId = useCallback(async () => {\n return await whipClientRef.current?.currentCameraDeviceId();\n }, []);\n\n useEffect(() => {\n try {\n const initializeCamera = async () => {\n await whipClientRef.current?.initializeCamera(\n {\n audioEnabled: audioEnabled ?? true,\n videoEnabled: videoEnabled ?? true,\n videoParameters: videoParameters,\n preferredVideoCodecs: preferredVideoCodecs,\n preferredAudioCodecs: preferredAudioCodecs,\n },\n camera?.id ?? cameras[0].id,\n );\n };\n initializeCamera();\n } catch {\n console.error('Failed to initialize camera');\n }\n const ref = whipClientRef.current;\n return () => {\n ref?.disconnect();\n };\n }, [\n camera,\n videoParameters,\n videoEnabled,\n audioEnabled,\n preferredVideoCodecs,\n preferredAudioCodecs,\n whipClientRef,\n ]);\n\n return {\n connect,\n disconnect,\n flipCamera,\n switchCamera,\n currentCameraDeviceId,\n isConnected,\n whipClientRef,\n };\n};\n"]}
@@ -1,36 +0,0 @@
1
- import { WhepClientViewRef } from 'react-native-whip-whep';
2
- export type ConnectViewerConfig = {
3
- token: string;
4
- streamId?: never;
5
- } | {
6
- streamId: string;
7
- token?: never;
8
- };
9
- /**
10
- * @category Livestream
11
- */
12
- export interface useLivestreamViewerResult {
13
- /**
14
- * Callback to start receiving a livestream.
15
- * If the livestream is private, provide `token`.
16
- * If the livestream is public, provide `streamId`.
17
- */
18
- connect: (config: ConnectViewerConfig, url?: string) => Promise<void>;
19
- /** Disconnect from a stream previously connected to with {@link connect} */
20
- disconnect: () => Promise<void>;
21
- /** Utility flag which indicates the current connection status */
22
- isConnected: boolean;
23
- /** Utility flag which indicates if whep client is connecting */
24
- isLoading: boolean;
25
- /**
26
- * Reference to the WhepClient instance. Needs to be passed to the {@link LivestreamViewer} component.
27
- */
28
- whepClientRef: React.RefObject<WhepClientViewRef | null>;
29
- }
30
- /**
31
- * Hook for receiving a published livestream.
32
- * @category Livestream
33
- * @group Hooks
34
- */
35
- export declare const useLivestreamViewer: () => useLivestreamViewerResult;
36
- //# sourceMappingURL=useLivestreamViewer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLivestreamViewer.d.ts","sourceRoot":"","sources":["../../../src/livestream/hooks/useLivestreamViewer.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,MAAM,mBAAmB,GAC3B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,GACnC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAOxC;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,4EAA4E;IAC5E,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,iEAAiE;IACjE,WAAW,EAAE,OAAO,CAAC;IACrB,gEAAgE;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CAC1D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAO,yBAqEtC,CAAC"}
@@ -1,73 +0,0 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { useWhepConnectionState, } from 'react-native-whip-whep';
3
- import { FISHJAM_WHEP_URL } from '../../consts';
4
- const urlFromConfig = (config) => {
5
- if (config.streamId)
6
- return `${FISHJAM_WHEP_URL}/${config.streamId}`;
7
- return FISHJAM_WHEP_URL;
8
- };
9
- /**
10
- * Hook for receiving a published livestream.
11
- * @category Livestream
12
- * @group Hooks
13
- */
14
- export const useLivestreamViewer = () => {
15
- const [isLoading, setIsLoading] = useState(false);
16
- const [isInitialized, setIsInitialized] = useState(false);
17
- const state = useWhepConnectionState();
18
- const isConnected = state === 'connected';
19
- const whepClientRef = useRef(null);
20
- const isConnectingRef = useRef(false);
21
- useEffect(() => {
22
- const createClient = () => {
23
- whepClientRef.current?.createWhepClient({
24
- audioEnabled: true,
25
- videoEnabled: true,
26
- });
27
- };
28
- createClient();
29
- const ref = whepClientRef.current;
30
- return () => {
31
- ref?.disconnect();
32
- };
33
- }, []);
34
- const connect = useCallback(async (config, url) => {
35
- if (isConnectingRef.current) {
36
- return;
37
- }
38
- isConnectingRef.current = true;
39
- setIsLoading(true);
40
- try {
41
- if (!isInitialized) {
42
- await whepClientRef.current?.createWhepClient({
43
- audioEnabled: true,
44
- videoEnabled: true,
45
- });
46
- setIsInitialized(true);
47
- }
48
- await whepClientRef.current?.connect({
49
- serverUrl: url ?? urlFromConfig(config),
50
- authToken: config.token,
51
- });
52
- setIsLoading(false);
53
- }
54
- catch (error) {
55
- console.error('Failed to connect to WHEP Client', error);
56
- setIsLoading(false);
57
- }
58
- finally {
59
- isConnectingRef.current = false;
60
- }
61
- }, [isInitialized]);
62
- const disconnect = useCallback(async () => {
63
- await whepClientRef.current?.disconnect();
64
- }, []);
65
- return {
66
- connect,
67
- disconnect,
68
- whepClientRef,
69
- isConnected,
70
- isLoading,
71
- };
72
- };
73
- //# sourceMappingURL=useLivestreamViewer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLivestreamViewer.js","sourceRoot":"","sources":["../../../src/livestream/hooks/useLivestreamViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EACL,sBAAsB,GAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,MAAM,aAAa,GAAG,CAAC,MAA2B,EAAE,EAAE;IACpD,IAAI,MAAM,CAAC,QAAQ;QAAE,OAAO,GAAG,gBAAgB,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrE,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAwBF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAA8B,EAAE;IACjE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IACvC,MAAM,WAAW,GAAG,KAAK,KAAK,WAAW,CAAC;IAE1C,MAAM,aAAa,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEtC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,aAAa,CAAC,OAAO,EAAE,gBAAgB,CAAC;gBACtC,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;aACnB,CAAC,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AAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,OAAO;QACP,UAAU;QACV,aAAa;QACb,WAAW;QACX,SAAS;KACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n useWhepConnectionState,\n WhepClientViewRef,\n} from 'react-native-whip-whep';\nimport { FISHJAM_WHEP_URL } from '../../consts';\n\nexport type ConnectViewerConfig =\n | { token: string; streamId?: never }\n | { streamId: string; token?: never };\n\nconst urlFromConfig = (config: ConnectViewerConfig) => {\n if (config.streamId) return `${FISHJAM_WHEP_URL}/${config.streamId}`;\n return FISHJAM_WHEP_URL;\n};\n\n/**\n * @category Livestream\n */\nexport interface useLivestreamViewerResult {\n /**\n * Callback to start receiving a livestream.\n * If the livestream is private, provide `token`.\n * If the livestream is public, provide `streamId`.\n */\n connect: (config: ConnectViewerConfig, url?: string) => Promise<void>;\n /** Disconnect from a stream previously connected to with {@link connect} */\n disconnect: () => Promise<void>;\n /** Utility flag which indicates the current connection status */\n isConnected: boolean;\n /** Utility flag which indicates if whep client is connecting */\n isLoading: boolean;\n /**\n * Reference to the WhepClient instance. Needs to be passed to the {@link LivestreamViewer} component.\n */\n whepClientRef: React.RefObject<WhepClientViewRef | null>;\n}\n\n/**\n * Hook for receiving a published livestream.\n * @category Livestream\n * @group Hooks\n */\nexport const useLivestreamViewer = (): useLivestreamViewerResult => {\n const [isLoading, setIsLoading] = useState(false);\n const [isInitialized, setIsInitialized] = useState(false);\n const state = useWhepConnectionState();\n const isConnected = state === 'connected';\n\n const whepClientRef = useRef<WhepClientViewRef | null>(null);\n const isConnectingRef = useRef(false);\n\n useEffect(() => {\n const createClient = () => {\n whepClientRef.current?.createWhepClient({\n audioEnabled: true,\n videoEnabled: true,\n });\n };\n createClient();\n\n const ref = whepClientRef.current;\n return () => {\n ref?.disconnect();\n };\n }, []);\n\n const connect = useCallback(\n async (config: ConnectViewerConfig, url?: string) => {\n if (isConnectingRef.current) {\n return;\n }\n\n isConnectingRef.current = true;\n setIsLoading(true);\n\n try {\n if (!isInitialized) {\n await whepClientRef.current?.createWhepClient({\n audioEnabled: true,\n videoEnabled: true,\n });\n setIsInitialized(true);\n }\n\n await whepClientRef.current?.connect({\n serverUrl: url ?? urlFromConfig(config),\n authToken: config.token,\n });\n\n setIsLoading(false);\n } catch (error) {\n console.error('Failed to connect to WHEP Client', error);\n setIsLoading(false);\n } finally {\n isConnectingRef.current = false;\n }\n },\n [isInitialized],\n );\n\n const disconnect = useCallback(async () => {\n await whepClientRef.current?.disconnect();\n }, []);\n\n return {\n connect,\n disconnect,\n whepClientRef,\n isConnected,\n isLoading,\n };\n};\n"]}
@@ -1,12 +0,0 @@
1
- export { LivestreamStreamer } from './components/LivestreamStreamer';
2
- export { LivestreamViewer } from './components/LivestreamViewer';
3
- export { useLivestreamViewer } from './hooks/useLivestreamViewer';
4
- export { useLivestreamStreamer } from './hooks/useLivestreamStreamer';
5
- export { useLivestreamScreenSharingStreamer } from './hooks/useLivestreamScreenSharingStreamer';
6
- export { cameras, VideoParameters } from 'react-native-whip-whep';
7
- export type { LivestreamStreamerProps } from './components/LivestreamStreamer';
8
- export type { ConnectViewerConfig } from './hooks/useLivestreamViewer';
9
- export type { useLivestreamViewerResult } from './hooks/useLivestreamViewer';
10
- export type { useLivestreamStreamerResult } from './hooks/useLivestreamStreamer';
11
- export type { LivestreamViewerProps, LivestreamViewerRef, } from './components/LivestreamViewer';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/livestream/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EACV,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC"}
@@ -1,7 +0,0 @@
1
- export { LivestreamStreamer } from './components/LivestreamStreamer';
2
- export { LivestreamViewer } from './components/LivestreamViewer';
3
- export { useLivestreamViewer } from './hooks/useLivestreamViewer';
4
- export { useLivestreamStreamer } from './hooks/useLivestreamStreamer';
5
- export { useLivestreamScreenSharingStreamer } from './hooks/useLivestreamScreenSharingStreamer';
6
- export { cameras, VideoParameters } from 'react-native-whip-whep';
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/livestream/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { LivestreamStreamer } from './components/LivestreamStreamer';\nexport { LivestreamViewer } from './components/LivestreamViewer';\nexport { useLivestreamViewer } from './hooks/useLivestreamViewer';\nexport { useLivestreamStreamer } from './hooks/useLivestreamStreamer';\nexport { useLivestreamScreenSharingStreamer } from './hooks/useLivestreamScreenSharingStreamer';\nexport { cameras, VideoParameters } from 'react-native-whip-whep';\nexport type { LivestreamStreamerProps } from './components/LivestreamStreamer';\nexport type { ConnectViewerConfig } from './hooks/useLivestreamViewer';\nexport type { useLivestreamViewerResult } from './hooks/useLivestreamViewer';\nexport type { useLivestreamStreamerResult } from './hooks/useLivestreamStreamer';\nexport type {\n LivestreamViewerProps,\n LivestreamViewerRef,\n} from './components/LivestreamViewer';\n"]}
@@ -1,63 +0,0 @@
1
- import * as _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "fishjam";
3
- /** Defines any type of message sent between FJ and a peer */
4
- export interface PeerMessage {
5
- authenticated?: PeerMessage_Authenticated | undefined;
6
- authRequest?: PeerMessage_AuthRequest | undefined;
7
- mediaEvent?: PeerMessage_MediaEvent | undefined;
8
- }
9
- /** Response sent by FJ, confirming successfull authentication */
10
- export interface PeerMessage_Authenticated {
11
- }
12
- /** Request sent by peer, to authenticate to FJ server */
13
- export interface PeerMessage_AuthRequest {
14
- token: string;
15
- }
16
- /** Any type of WebRTC messages passed betweend FJ and peer */
17
- export interface PeerMessage_MediaEvent {
18
- data: string;
19
- }
20
- export declare const PeerMessage: {
21
- encode(message: PeerMessage, writer?: _m0.Writer): _m0.Writer;
22
- decode(input: _m0.Reader | Uint8Array, length?: number): PeerMessage;
23
- fromJSON(object: any): PeerMessage;
24
- toJSON(message: PeerMessage): unknown;
25
- create<I extends Exact<DeepPartial<PeerMessage>, I>>(base?: I): PeerMessage;
26
- fromPartial<I extends Exact<DeepPartial<PeerMessage>, I>>(object: I): PeerMessage;
27
- };
28
- export declare const PeerMessage_Authenticated: {
29
- encode(_: PeerMessage_Authenticated, writer?: _m0.Writer): _m0.Writer;
30
- decode(input: _m0.Reader | Uint8Array, length?: number): PeerMessage_Authenticated;
31
- fromJSON(_: any): PeerMessage_Authenticated;
32
- toJSON(_: PeerMessage_Authenticated): unknown;
33
- create<I extends Exact<DeepPartial<PeerMessage_Authenticated>, I>>(base?: I): PeerMessage_Authenticated;
34
- fromPartial<I extends Exact<DeepPartial<PeerMessage_Authenticated>, I>>(_: I): PeerMessage_Authenticated;
35
- };
36
- export declare const PeerMessage_AuthRequest: {
37
- encode(message: PeerMessage_AuthRequest, writer?: _m0.Writer): _m0.Writer;
38
- decode(input: _m0.Reader | Uint8Array, length?: number): PeerMessage_AuthRequest;
39
- fromJSON(object: any): PeerMessage_AuthRequest;
40
- toJSON(message: PeerMessage_AuthRequest): unknown;
41
- create<I extends Exact<DeepPartial<PeerMessage_AuthRequest>, I>>(base?: I): PeerMessage_AuthRequest;
42
- fromPartial<I extends Exact<DeepPartial<PeerMessage_AuthRequest>, I>>(object: I): PeerMessage_AuthRequest;
43
- };
44
- export declare const PeerMessage_MediaEvent: {
45
- encode(message: PeerMessage_MediaEvent, writer?: _m0.Writer): _m0.Writer;
46
- decode(input: _m0.Reader | Uint8Array, length?: number): PeerMessage_MediaEvent;
47
- fromJSON(object: any): PeerMessage_MediaEvent;
48
- toJSON(message: PeerMessage_MediaEvent): unknown;
49
- create<I extends Exact<DeepPartial<PeerMessage_MediaEvent>, I>>(base?: I): PeerMessage_MediaEvent;
50
- fromPartial<I extends Exact<DeepPartial<PeerMessage_MediaEvent>, I>>(object: I): PeerMessage_MediaEvent;
51
- };
52
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
53
- export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
54
- [K in keyof T]?: DeepPartial<T[K]>;
55
- } : Partial<T>;
56
- type KeysOfUnion<T> = T extends T ? keyof T : never;
57
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
58
- [K in keyof P]: Exact<P[K], I[K]>;
59
- } & {
60
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
61
- };
62
- export {};
63
- //# sourceMappingURL=peer_notifications.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"peer_notifications.d.ts","sourceRoot":"","sources":["../../../src/protos/fishjam/peer_notifications.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD,WAAW,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACjD;AAED,iEAAiE;AACjE,MAAM,WAAW,yBAAyB;CACzC;AAED,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8DAA8D;AAC9D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAMD,eAAO,MAAM,WAAW;oBACN,WAAW,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAapE,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,WAAW;qBAqCnD,GAAG,GAAG,WAAW;oBAQlB,WAAW,GAAG,OAAO;WAc9B,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW;gBAG/D,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,WAAW;CAalF,CAAC;AAMF,eAAO,MAAM,yBAAyB;cAC1B,yBAAyB,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAI5E,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,yBAAyB;gBAgBtE,GAAG,GAAG,yBAAyB;cAIjC,yBAAyB,GAAG,OAAO;W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C,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAC9C,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC;AAEf,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AACpD,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACrD,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC"}
@@ -1,235 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v1.178.0
4
- // protoc v5.26.1
5
- // source: protos/fishjam/peer_notifications.proto
6
- /* eslint-disable */
7
- import * as _m0 from "protobufjs/minimal";
8
- export const protobufPackage = "fishjam";
9
- function createBasePeerMessage() {
10
- return { authenticated: undefined, authRequest: undefined, mediaEvent: undefined };
11
- }
12
- export const PeerMessage = {
13
- encode(message, writer = _m0.Writer.create()) {
14
- if (message.authenticated !== undefined) {
15
- PeerMessage_Authenticated.encode(message.authenticated, writer.uint32(10).fork()).ldelim();
16
- }
17
- if (message.authRequest !== undefined) {
18
- PeerMessage_AuthRequest.encode(message.authRequest, writer.uint32(18).fork()).ldelim();
19
- }
20
- if (message.mediaEvent !== undefined) {
21
- PeerMessage_MediaEvent.encode(message.mediaEvent, writer.uint32(26).fork()).ldelim();
22
- }
23
- return writer;
24
- },
25
- decode(input, length) {
26
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
27
- let end = length === undefined ? reader.len : reader.pos + length;
28
- const message = createBasePeerMessage();
29
- while (reader.pos < end) {
30
- const tag = reader.uint32();
31
- switch (tag >>> 3) {
32
- case 1:
33
- if (tag !== 10) {
34
- break;
35
- }
36
- message.authenticated = PeerMessage_Authenticated.decode(reader, reader.uint32());
37
- continue;
38
- case 2:
39
- if (tag !== 18) {
40
- break;
41
- }
42
- message.authRequest = PeerMessage_AuthRequest.decode(reader, reader.uint32());
43
- continue;
44
- case 3:
45
- if (tag !== 26) {
46
- break;
47
- }
48
- message.mediaEvent = PeerMessage_MediaEvent.decode(reader, reader.uint32());
49
- continue;
50
- }
51
- if ((tag & 7) === 4 || tag === 0) {
52
- break;
53
- }
54
- reader.skipType(tag & 7);
55
- }
56
- return message;
57
- },
58
- fromJSON(object) {
59
- return {
60
- authenticated: isSet(object.authenticated) ? PeerMessage_Authenticated.fromJSON(object.authenticated) : undefined,
61
- authRequest: isSet(object.authRequest) ? PeerMessage_AuthRequest.fromJSON(object.authRequest) : undefined,
62
- mediaEvent: isSet(object.mediaEvent) ? PeerMessage_MediaEvent.fromJSON(object.mediaEvent) : undefined,
63
- };
64
- },
65
- toJSON(message) {
66
- const obj = {};
67
- if (message.authenticated !== undefined) {
68
- obj.authenticated = PeerMessage_Authenticated.toJSON(message.authenticated);
69
- }
70
- if (message.authRequest !== undefined) {
71
- obj.authRequest = PeerMessage_AuthRequest.toJSON(message.authRequest);
72
- }
73
- if (message.mediaEvent !== undefined) {
74
- obj.mediaEvent = PeerMessage_MediaEvent.toJSON(message.mediaEvent);
75
- }
76
- return obj;
77
- },
78
- create(base) {
79
- return PeerMessage.fromPartial(base ?? {});
80
- },
81
- fromPartial(object) {
82
- const message = createBasePeerMessage();
83
- message.authenticated = (object.authenticated !== undefined && object.authenticated !== null)
84
- ? PeerMessage_Authenticated.fromPartial(object.authenticated)
85
- : undefined;
86
- message.authRequest = (object.authRequest !== undefined && object.authRequest !== null)
87
- ? PeerMessage_AuthRequest.fromPartial(object.authRequest)
88
- : undefined;
89
- message.mediaEvent = (object.mediaEvent !== undefined && object.mediaEvent !== null)
90
- ? PeerMessage_MediaEvent.fromPartial(object.mediaEvent)
91
- : undefined;
92
- return message;
93
- },
94
- };
95
- function createBasePeerMessage_Authenticated() {
96
- return {};
97
- }
98
- export const PeerMessage_Authenticated = {
99
- encode(_, writer = _m0.Writer.create()) {
100
- return writer;
101
- },
102
- decode(input, length) {
103
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
104
- let end = length === undefined ? reader.len : reader.pos + length;
105
- const message = createBasePeerMessage_Authenticated();
106
- while (reader.pos < end) {
107
- const tag = reader.uint32();
108
- switch (tag >>> 3) {
109
- }
110
- if ((tag & 7) === 4 || tag === 0) {
111
- break;
112
- }
113
- reader.skipType(tag & 7);
114
- }
115
- return message;
116
- },
117
- fromJSON(_) {
118
- return {};
119
- },
120
- toJSON(_) {
121
- const obj = {};
122
- return obj;
123
- },
124
- create(base) {
125
- return PeerMessage_Authenticated.fromPartial(base ?? {});
126
- },
127
- fromPartial(_) {
128
- const message = createBasePeerMessage_Authenticated();
129
- return message;
130
- },
131
- };
132
- function createBasePeerMessage_AuthRequest() {
133
- return { token: "" };
134
- }
135
- export const PeerMessage_AuthRequest = {
136
- encode(message, writer = _m0.Writer.create()) {
137
- if (message.token !== "") {
138
- writer.uint32(10).string(message.token);
139
- }
140
- return writer;
141
- },
142
- decode(input, length) {
143
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
144
- let end = length === undefined ? reader.len : reader.pos + length;
145
- const message = createBasePeerMessage_AuthRequest();
146
- while (reader.pos < end) {
147
- const tag = reader.uint32();
148
- switch (tag >>> 3) {
149
- case 1:
150
- if (tag !== 10) {
151
- break;
152
- }
153
- message.token = reader.string();
154
- continue;
155
- }
156
- if ((tag & 7) === 4 || tag === 0) {
157
- break;
158
- }
159
- reader.skipType(tag & 7);
160
- }
161
- return message;
162
- },
163
- fromJSON(object) {
164
- return { token: isSet(object.token) ? globalThis.String(object.token) : "" };
165
- },
166
- toJSON(message) {
167
- const obj = {};
168
- if (message.token !== "") {
169
- obj.token = message.token;
170
- }
171
- return obj;
172
- },
173
- create(base) {
174
- return PeerMessage_AuthRequest.fromPartial(base ?? {});
175
- },
176
- fromPartial(object) {
177
- const message = createBasePeerMessage_AuthRequest();
178
- message.token = object.token ?? "";
179
- return message;
180
- },
181
- };
182
- function createBasePeerMessage_MediaEvent() {
183
- return { data: "" };
184
- }
185
- export const PeerMessage_MediaEvent = {
186
- encode(message, writer = _m0.Writer.create()) {
187
- if (message.data !== "") {
188
- writer.uint32(10).string(message.data);
189
- }
190
- return writer;
191
- },
192
- decode(input, length) {
193
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
194
- let end = length === undefined ? reader.len : reader.pos + length;
195
- const message = createBasePeerMessage_MediaEvent();
196
- while (reader.pos < end) {
197
- const tag = reader.uint32();
198
- switch (tag >>> 3) {
199
- case 1:
200
- if (tag !== 10) {
201
- break;
202
- }
203
- message.data = reader.string();
204
- continue;
205
- }
206
- if ((tag & 7) === 4 || tag === 0) {
207
- break;
208
- }
209
- reader.skipType(tag & 7);
210
- }
211
- return message;
212
- },
213
- fromJSON(object) {
214
- return { data: isSet(object.data) ? globalThis.String(object.data) : "" };
215
- },
216
- toJSON(message) {
217
- const obj = {};
218
- if (message.data !== "") {
219
- obj.data = message.data;
220
- }
221
- return obj;
222
- },
223
- create(base) {
224
- return PeerMessage_MediaEvent.fromPartial(base ?? {});
225
- },
226
- fromPartial(object) {
227
- const message = createBasePeerMessage_MediaEvent();
228
- message.data = object.data ?? "";
229
- return message;
230
- },
231
- };
232
- function isSet(value) {
233
- return value !== null && value !== undefined;
234
- }
235
- //# sourceMappingURL=peer_notifications.js.map