@fishjam-cloud/react-native-client 0.1.1 → 0.2.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 (109) hide show
  1. package/README.md +416 -0
  2. package/android/build.gradle +8 -6
  3. package/app.plugin.js +1 -1
  4. package/build/RNFishjamClientModule.d.ts +7 -5
  5. package/build/RNFishjamClientModule.d.ts.map +1 -1
  6. package/build/RNFishjamClientModule.js.map +1 -1
  7. package/build/common/client.d.ts +8 -1
  8. package/build/common/client.d.ts.map +1 -1
  9. package/build/common/client.js +9 -2
  10. package/build/common/client.js.map +1 -1
  11. package/build/components/VideoPreviewView.d.ts +3 -3
  12. package/build/components/VideoPreviewView.d.ts.map +1 -1
  13. package/build/components/VideoPreviewView.js +1 -1
  14. package/build/components/VideoPreviewView.js.map +1 -1
  15. package/build/hooks/useAudioSettings.d.ts.map +1 -1
  16. package/build/hooks/useAudioSettings.js +4 -5
  17. package/build/hooks/useAudioSettings.js.map +1 -1
  18. package/build/hooks/useBandwidthEstimation.d.ts +0 -3
  19. package/build/hooks/useBandwidthEstimation.d.ts.map +1 -1
  20. package/build/hooks/useBandwidthEstimation.js +3 -6
  21. package/build/hooks/useBandwidthEstimation.js.map +1 -1
  22. package/build/hooks/useCamera.d.ts +12 -21
  23. package/build/hooks/useCamera.d.ts.map +1 -1
  24. package/build/hooks/useCamera.js +52 -52
  25. package/build/hooks/useCamera.js.map +1 -1
  26. package/build/{common/eventEmitter.d.ts → hooks/useFishjamEvent.d.ts} +2 -3
  27. package/build/hooks/useFishjamEvent.d.ts.map +1 -0
  28. package/build/{common/eventEmitter.js → hooks/useFishjamEvent.js} +11 -2
  29. package/build/hooks/useFishjamEvent.js.map +1 -0
  30. package/build/hooks/useMicrophone.d.ts.map +1 -1
  31. package/build/hooks/useMicrophone.js +3 -7
  32. package/build/hooks/useMicrophone.js.map +1 -1
  33. package/build/hooks/useParticipants.d.ts +0 -3
  34. package/build/hooks/useParticipants.d.ts.map +1 -1
  35. package/build/hooks/useParticipants.js +6 -6
  36. package/build/hooks/useParticipants.js.map +1 -1
  37. package/build/hooks/useReconnection.d.ts.map +1 -1
  38. package/build/hooks/useReconnection.js +8 -18
  39. package/build/hooks/useReconnection.js.map +1 -1
  40. package/build/hooks/useScreencast.d.ts.map +1 -1
  41. package/build/hooks/useScreencast.js +3 -7
  42. package/build/hooks/useScreencast.js.map +1 -1
  43. package/build/index.d.ts +4 -3
  44. package/build/index.d.ts.map +1 -1
  45. package/build/index.js +3 -1
  46. package/build/index.js.map +1 -1
  47. package/build/types.d.ts +25 -0
  48. package/build/types.d.ts.map +1 -1
  49. package/build/types.js +10 -1
  50. package/build/types.js.map +1 -1
  51. package/build/utils/foregroundService.d.ts +30 -0
  52. package/build/utils/foregroundService.d.ts.map +1 -0
  53. package/build/utils/foregroundService.js +41 -0
  54. package/build/utils/foregroundService.js.map +1 -0
  55. package/expo-module.config.json +3 -3
  56. package/ios/RNFishjamClient.swift +34 -29
  57. package/ios/RNFishjamClientModule.swift +12 -8
  58. package/package.json +23 -18
  59. package/.eslintignore +0 -7
  60. package/.eslintrc +0 -6
  61. package/.prettierrc +0 -9
  62. package/.watchmanconfig +0 -1
  63. package/android/.editorconfig +0 -9
  64. package/android/src/main/AndroidManifest.xml +0 -2
  65. package/android/src/main/java/org/membraneframework/reactnative/AudioDeviceKind.kt +0 -34
  66. package/android/src/main/java/org/membraneframework/reactnative/AudioSwitchManager.kt +0 -61
  67. package/android/src/main/java/org/membraneframework/reactnative/EmitableEvents.kt +0 -14
  68. package/android/src/main/java/org/membraneframework/reactnative/Errors.kt +0 -31
  69. package/android/src/main/java/org/membraneframework/reactnative/RNFishjamClient.kt +0 -866
  70. package/android/src/main/java/org/membraneframework/reactnative/RNFishjamClientModule.kt +0 -294
  71. package/android/src/main/java/org/membraneframework/reactnative/Utils.kt +0 -11
  72. package/android/src/main/java/org/membraneframework/reactnative/VideoPreviewView.kt +0 -40
  73. package/android/src/main/java/org/membraneframework/reactnative/VideoPreviewViewModule.kt +0 -17
  74. package/android/src/main/java/org/membraneframework/reactnative/VideoRendererView.kt +0 -58
  75. package/android/src/main/java/org/membraneframework/reactnative/VideoRendererViewModule.kt +0 -25
  76. package/android/src/main/java/org/membraneframework/reactnative/VideoView.kt +0 -77
  77. package/babel.config.js +0 -2
  78. package/build/common/eventEmitter.d.ts.map +0 -1
  79. package/build/common/eventEmitter.js.map +0 -1
  80. package/ios/swift-format-config.json +0 -56
  81. package/plugin/broadcastExtensionFiles/Info.plist +0 -27
  82. package/plugin/broadcastExtensionFiles/MembraneBroadcastSampleHandler.swift +0 -50
  83. package/plugin/broadcastExtensionFiles/MembraneScreenBroadcastExtension.entitlements +0 -10
  84. package/plugin/src/withMembrane.ts +0 -310
  85. package/plugin/tsconfig.json +0 -9
  86. package/scripts/lint.sh +0 -18
  87. package/scripts/lint_check.sh +0 -14
  88. package/src/RNFishjamClientModule.ts +0 -73
  89. package/src/__tests__/index.test.tsx +0 -199
  90. package/src/common/client.ts +0 -33
  91. package/src/common/eventEmitter.ts +0 -21
  92. package/src/common/metadata.ts +0 -12
  93. package/src/common/webRTC.ts +0 -31
  94. package/src/components/VideoPreviewView.tsx +0 -33
  95. package/src/components/VideoRendererView.tsx +0 -31
  96. package/src/hooks/useAudioSettings.ts +0 -115
  97. package/src/hooks/useBandwidthEstimation.ts +0 -24
  98. package/src/hooks/useCamera.ts +0 -270
  99. package/src/hooks/useMicrophone.ts +0 -38
  100. package/src/hooks/useParticipants.ts +0 -118
  101. package/src/hooks/useReconnection.ts +0 -41
  102. package/src/hooks/useScreencast.ts +0 -146
  103. package/src/index.tsx +0 -63
  104. package/src/protos/fishjam/peer_notifications.ts +0 -299
  105. package/src/stats/types.ts +0 -56
  106. package/src/stats/useRTCStatistics.ts +0 -97
  107. package/src/types.ts +0 -49
  108. package/tsconfig.json +0 -9
  109. package/typedoc.json +0 -5
@@ -1,7 +1,7 @@
1
- import { useCallback, useEffect, useState } from 'react';
1
+ import { useCallback, useState } from 'react';
2
2
  import RNFishjamClientModule from '../RNFishjamClientModule';
3
- import { ReceivableEvents, eventEmitter } from '../common/eventEmitter';
4
3
  import { Platform } from 'react-native';
4
+ import { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';
5
5
  const defaultSimulcastConfig = () => ({
6
6
  enabled: false,
7
7
  activeEncodings: [],
@@ -14,11 +14,7 @@ let screencastSimulcastConfig = defaultSimulcastConfig();
14
14
  export function useScreencast() {
15
15
  const [isScreencastOn, setIsScreencastOn] = useState(RNFishjamClientModule.isScreencastOn);
16
16
  const [simulcastConfig, setSimulcastConfig] = useState(screencastSimulcastConfig);
17
- useEffect(() => {
18
- const eventListener = eventEmitter.addListener(ReceivableEvents.IsScreencastOn, (event) => setIsScreencastOn(event.IsScreencastOn));
19
- setIsScreencastOn(RNFishjamClientModule.isScreencastOn);
20
- return () => eventListener.remove();
21
- }, []);
17
+ useFishjamEvent(ReceivableEvents.IsScreencastOn, setIsScreencastOn);
22
18
  /**
23
19
  * Toggles the screencast on/off
24
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useScreencast.js","sourceRoot":"","sources":["../../src/hooks/useScreencast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AASzD,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA2BxC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,EAAE;CACpB,CAAC,CAAC;AAEH,IAAI,yBAAyB,GAAoB,sBAAsB,EAAE,CAAC;AAE1E;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ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B,EAAE,EAAE;QAC3D,MAAM,qBAAqB,CAAC,mCAAmC,CAC7D,QAAQ,EACR,SAAS,CACV,CAAC;IACJ,CAAC,EACD,EAAE,CACH,CAAC;IAEF;;;;;;OAMG;IACH,MAAM,2BAA2B,GAAG,WAAW,CAC7C,KAAK,EAAE,SAAyB,EAAE,EAAE;QAClC,MAAM,qBAAqB,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACrE,CAAC,EACD,EAAE,CACH,CAAC;IAEF,MAAM,0BAA0B,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxD,IAAI,QAAQ,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC;YAC7B,OAAO,MAAM,qBAAqB,CAAC,0BAA0B,EAAE,CAAC;QAClE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,cAAc;QACd,gBAAgB;QAChB,6BAA6B;QAC7B,eAAe;QACf,mCAAmC;QACnC,2BAA2B;QAC3B,0BAA0B;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport {\n BandwidthLimit,\n SimulcastConfig,\n TrackBandwidthLimit,\n TrackEncoding,\n TrackMetadata,\n} from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\nimport { ReceivableEvents, eventEmitter } from '../common/eventEmitter';\nimport { Platform } from 'react-native';\n\ntype IsScreencastOnEvent = { IsScreencastOn: boolean };\n\nexport type ScreencastQuality = 'VGA' | 'HD5' | 'HD15' | 'FHD15' | 'FHD30';\n\nexport type ScreencastOptions = {\n /**\n * Resolution + fps of screencast track, one of: `VGA`, `HD5`, `HD15`, `FHD15`, `FHD30`.\n * Note that quality might be worse than specified due to device capabilities, internet\n * connection etc.\n * @default `HD15``\n */\n quality: ScreencastQuality;\n /**\n * bandwidth limit of a screencast track. By default there is no bandwidth limit.\n */\n maxBandwidth: TrackBandwidthLimit;\n};\nexport type ScreencastOptionsInternal = {\n screencastMetadata: TrackMetadata & { displayName?: string };\n /**\n * SimulcastConfig of a screencast track. By default simulcast is disabled.\n */\n simulcastConfig: SimulcastConfig;\n};\n\nconst defaultSimulcastConfig = () => ({\n enabled: false,\n activeEncodings: [],\n});\n\nlet screencastSimulcastConfig: SimulcastConfig = defaultSimulcastConfig();\n\n/**\n * This hook can toggle screen sharing on/off and provides current screencast state.\n * @returns An object with functions to manage screencast.\n */\nexport function useScreencast() {\n const [isScreencastOn, setIsScreencastOn] = useState<boolean>(\n RNFishjamClientModule.isScreencastOn,\n );\n\n const [simulcastConfig, setSimulcastConfig] = useState<SimulcastConfig>(\n screencastSimulcastConfig,\n );\n\n useEffect(() => {\n const eventListener = eventEmitter.addListener<IsScreencastOnEvent>(\n ReceivableEvents.IsScreencastOn,\n (event) => setIsScreencastOn(event.IsScreencastOn),\n );\n setIsScreencastOn(RNFishjamClientModule.isScreencastOn);\n return () => eventListener.remove();\n }, []);\n\n /**\n * Toggles the screencast on/off\n */\n const toggleScreencast = useCallback(\n async (screencastOptions: Partial<ScreencastOptions> = {}) => {\n const options = {\n ...screencastOptions,\n screencastMetadata: {\n displayName: 'presenting',\n type: 'screensharing' as const,\n active: !isScreencastOn,\n },\n };\n await RNFishjamClientModule.toggleScreencast(options);\n screencastSimulcastConfig = defaultSimulcastConfig(); //to do: sync with camera settings\n setSimulcastConfig(screencastSimulcastConfig);\n },\n [isScreencastOn],\n );\n\n /**\n * Toggles simulcast encoding of a screencast track on/off\n * @param encoding encoding to toggle\n */\n const toggleScreencastTrackEncoding = useCallback(\n async (encoding: TrackEncoding) => {\n screencastSimulcastConfig =\n await RNFishjamClientModule.toggleScreencastTrackEncoding(encoding);\n setSimulcastConfig(screencastSimulcastConfig);\n },\n [],\n );\n\n /**\n * updates maximum bandwidth for the given simulcast encoding of the screencast track\n * @param encoding encoding to update\n * @param bandwidth BandwidthLimit to set\n */\n const setScreencastTrackEncodingBandwidth = useCallback(\n async (encoding: TrackEncoding, bandwidth: BandwidthLimit) => {\n await RNFishjamClientModule.setScreencastTrackEncodingBandwidth(\n encoding,\n bandwidth,\n );\n },\n [],\n );\n\n /**\n * updates maximum bandwidth for the screencast track. This value directly translates\n * to quality of the stream and the amount of RTP packets being sent. In case simulcast\n * is enabled bandwidth is split between all of the variant streams proportionally to\n * their resolution\n * @param bandwidth BandwidthLimit to set\n */\n const setScreencastTrackBandwidth = useCallback(\n async (bandwidth: BandwidthLimit) => {\n await RNFishjamClientModule.setScreencastTrackBandwidth(bandwidth);\n },\n [],\n );\n\n const handleScreencastPermission = useCallback(async () => {\n if (Platform.OS == 'android') {\n return await RNFishjamClientModule.handleScreencastPermission();\n }\n return 'denied';\n }, []);\n\n return {\n isScreencastOn,\n toggleScreencast,\n toggleScreencastTrackEncoding,\n simulcastConfig,\n setScreencastTrackEncodingBandwidth,\n setScreencastTrackBandwidth,\n handleScreencastPermission,\n };\n}\n"]}
1
+ {"version":3,"file":"useScreencast.js","sourceRoot":"","sources":["../../src/hooks/useScreencast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAS9C,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAyBtE,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,EAAE;CACpB,CAAC,CAAC;AAEH,IAAI,yBAAyB,GAAoB,sBAAsB,EAAE,CAAC;AAE1E;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,qBAAqB,CAAC,cAAc,CACrC,CAAC;IAEF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CACpD,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AQ,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC;YAC7B,OAAO,MAAM,qBAAqB,CAAC,0BAA0B,EAAE,CAAC;QAClE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,cAAc;QACd,gBAAgB;QAChB,6BAA6B;QAC7B,eAAe;QACf,mCAAmC;QACnC,2BAA2B;QAC3B,0BAA0B;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useState } from 'react';\n\nimport {\n BandwidthLimit,\n SimulcastConfig,\n TrackBandwidthLimit,\n TrackEncoding,\n TrackMetadata,\n} from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\nimport { Platform } from 'react-native';\nimport { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';\n\nexport type ScreencastQuality = 'VGA' | 'HD5' | 'HD15' | 'FHD15' | 'FHD30';\n\nexport type ScreencastOptions = {\n /**\n * Resolution + fps of screencast track, one of: `VGA`, `HD5`, `HD15`, `FHD15`, `FHD30`.\n * Note that quality might be worse than specified due to device capabilities, internet\n * connection etc.\n * @default `HD15``\n */\n quality: ScreencastQuality;\n /**\n * bandwidth limit of a screencast track. By default there is no bandwidth limit.\n */\n maxBandwidth: TrackBandwidthLimit;\n};\nexport type ScreencastOptionsInternal = {\n screencastMetadata: TrackMetadata & { displayName?: string };\n /**\n * SimulcastConfig of a screencast track. By default simulcast is disabled.\n */\n simulcastConfig: SimulcastConfig;\n};\n\nconst defaultSimulcastConfig = () => ({\n enabled: false,\n activeEncodings: [],\n});\n\nlet screencastSimulcastConfig: SimulcastConfig = defaultSimulcastConfig();\n\n/**\n * This hook can toggle screen sharing on/off and provides current screencast state.\n * @returns An object with functions to manage screencast.\n */\nexport function useScreencast() {\n const [isScreencastOn, setIsScreencastOn] = useState(\n RNFishjamClientModule.isScreencastOn,\n );\n\n const [simulcastConfig, setSimulcastConfig] = useState<SimulcastConfig>(\n screencastSimulcastConfig,\n );\n\n useFishjamEvent(ReceivableEvents.IsScreencastOn, setIsScreencastOn);\n\n /**\n * Toggles the screencast on/off\n */\n const toggleScreencast = useCallback(\n async (screencastOptions: Partial<ScreencastOptions> = {}) => {\n const options = {\n ...screencastOptions,\n screencastMetadata: {\n displayName: 'presenting',\n type: 'screensharing' as const,\n active: !isScreencastOn,\n },\n };\n await RNFishjamClientModule.toggleScreencast(options);\n screencastSimulcastConfig = defaultSimulcastConfig(); //to do: sync with camera settings\n setSimulcastConfig(screencastSimulcastConfig);\n },\n [isScreencastOn],\n );\n\n /**\n * Toggles simulcast encoding of a screencast track on/off\n * @param encoding encoding to toggle\n */\n const toggleScreencastTrackEncoding = useCallback(\n async (encoding: TrackEncoding) => {\n screencastSimulcastConfig =\n await RNFishjamClientModule.toggleScreencastTrackEncoding(encoding);\n setSimulcastConfig(screencastSimulcastConfig);\n },\n [],\n );\n\n /**\n * updates maximum bandwidth for the given simulcast encoding of the screencast track\n * @param encoding encoding to update\n * @param bandwidth BandwidthLimit to set\n */\n const setScreencastTrackEncodingBandwidth = useCallback(\n async (encoding: TrackEncoding, bandwidth: BandwidthLimit) => {\n await RNFishjamClientModule.setScreencastTrackEncodingBandwidth(\n encoding,\n bandwidth,\n );\n },\n [],\n );\n\n /**\n * updates maximum bandwidth for the screencast track. This value directly translates\n * to quality of the stream and the amount of RTP packets being sent. In case simulcast\n * is enabled bandwidth is split between all of the variant streams proportionally to\n * their resolution\n * @param bandwidth BandwidthLimit to set\n */\n const setScreencastTrackBandwidth = useCallback(\n async (bandwidth: BandwidthLimit) => {\n await RNFishjamClientModule.setScreencastTrackBandwidth(bandwidth);\n },\n [],\n );\n\n const handleScreencastPermission = useCallback(async () => {\n if (Platform.OS == 'android') {\n return await RNFishjamClientModule.handleScreencastPermission();\n }\n return 'denied';\n }, []);\n\n return {\n isScreencastOn,\n toggleScreencast,\n toggleScreencastTrackEncoding,\n simulcastConfig,\n setScreencastTrackEncodingBandwidth,\n setScreencastTrackBandwidth,\n handleScreencastPermission,\n };\n}\n"]}
package/build/index.d.ts CHANGED
@@ -2,9 +2,8 @@ export type { Participant, Track, TrackType, VadStatus, EncodingReason, } from '
2
2
  export { useParticipants } from './hooks/useParticipants';
3
3
  export type { AudioOutputDevice, AudioOutputDeviceType, AudioSessionMode, } from './hooks/useAudioSettings';
4
4
  export { useAudioSettings } from './hooks/useAudioSettings';
5
- export type { BandwidthEstimationEvent } from './hooks/useBandwidthEstimation';
6
5
  export { useBandwidthEstimation } from './hooks/useBandwidthEstimation';
7
- export type { CaptureDevice, CameraConfig, VideoQuality, } from './hooks/useCamera';
6
+ export type { Camera, CameraConfig, VideoQuality, CameraFacingDirection, } from './hooks/useCamera';
8
7
  export { useCamera } from './hooks/useCamera';
9
8
  export { useMicrophone } from './hooks/useMicrophone';
10
9
  export { useRTCStatistics } from './stats/useRTCStatistics';
@@ -15,10 +14,12 @@ export { useReconnection } from './hooks/useReconnection';
15
14
  export { updatePeerMetadata } from './common/metadata';
16
15
  export type { LoggingSeverity } from './common/webRTC';
17
16
  export { changeWebRTCLoggingSeverity, setTargetTrackEncoding, } from './common/webRTC';
18
- export { connect, leaveRoom } from './common/client';
17
+ export { joinRoom, leaveRoom } from './common/client';
19
18
  export type { VideoPreviewViewProps } from './components/VideoPreviewView';
20
19
  export { VideoPreviewView } from './components/VideoPreviewView';
21
20
  export type { VideoRendererProps } from './components/VideoRendererView';
22
21
  export { VideoRendererView } from './components/VideoRendererView';
22
+ export { AndroidForegroundServiceType } from './types';
23
+ export { startForegroundService, stopForegroundService, } from './utils/foregroundService';
23
24
  export type { TrackBandwidthLimit, TrackEncoding, SimulcastBandwidthLimit, BandwidthLimit, SimulcastConfig, VideoLayout, } from './types';
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,cAAc,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,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAC"}
package/build/index.js CHANGED
@@ -8,7 +8,9 @@ export { useScreencast } from './hooks/useScreencast';
8
8
  export { useReconnection } from './hooks/useReconnection';
9
9
  export { updatePeerMetadata } from './common/metadata';
10
10
  export { changeWebRTCLoggingSeverity, setTargetTrackEncoding, } from './common/webRTC';
11
- export { connect, leaveRoom } from './common/client';
11
+ export { joinRoom, leaveRoom } from './common/client';
12
12
  export { VideoPreviewView } from './components/VideoPreviewView';
13
13
  export { VideoRendererView } from './components/VideoRendererView';
14
+ export { AndroidForegroundServiceType } from './types';
15
+ export { startForegroundService, stopForegroundService, } from './utils/foregroundService';
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAOxE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAM5D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["export type {\n Participant,\n Track,\n TrackType,\n VadStatus,\n EncodingReason,\n} from './hooks/useParticipants';\nexport { useParticipants } from './hooks/useParticipants';\n\nexport type {\n AudioOutputDevice,\n AudioOutputDeviceType,\n AudioSessionMode,\n} from './hooks/useAudioSettings';\nexport { useAudioSettings } from './hooks/useAudioSettings';\n\nexport type { BandwidthEstimationEvent } from './hooks/useBandwidthEstimation';\nexport { useBandwidthEstimation } from './hooks/useBandwidthEstimation';\n\nexport type {\n CaptureDevice,\n CameraConfig,\n VideoQuality,\n} from './hooks/useCamera';\nexport { useCamera } from './hooks/useCamera';\n\nexport { useMicrophone } from './hooks/useMicrophone';\n\nexport { useRTCStatistics } from './stats/useRTCStatistics';\n\nexport type {\n ScreencastOptions,\n ScreencastQuality,\n} from './hooks/useScreencast';\nexport { useScreencast } from './hooks/useScreencast';\n\nexport type { ReconnectionStatus } from './hooks/useReconnection';\nexport { useReconnection } from './hooks/useReconnection';\n\nexport { updatePeerMetadata } from './common/metadata';\n\nexport type { LoggingSeverity } from './common/webRTC';\nexport {\n changeWebRTCLoggingSeverity,\n setTargetTrackEncoding,\n} from './common/webRTC';\n\nexport { connect, leaveRoom } from './common/client';\n\nexport type { VideoPreviewViewProps } from './components/VideoPreviewView';\nexport { VideoPreviewView } from './components/VideoPreviewView';\n\nexport type { VideoRendererProps } from './components/VideoRendererView';\nexport { VideoRendererView } from './components/VideoRendererView';\n\nexport type {\n TrackBandwidthLimit,\n TrackEncoding,\n SimulcastBandwidthLimit,\n BandwidthLimit,\n SimulcastConfig,\n VideoLayout,\n} from './types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAQxE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAM5D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC","sourcesContent":["export type {\n Participant,\n Track,\n TrackType,\n VadStatus,\n EncodingReason,\n} from './hooks/useParticipants';\nexport { useParticipants } from './hooks/useParticipants';\n\nexport type {\n AudioOutputDevice,\n AudioOutputDeviceType,\n AudioSessionMode,\n} from './hooks/useAudioSettings';\nexport { useAudioSettings } from './hooks/useAudioSettings';\n\nexport { useBandwidthEstimation } from './hooks/useBandwidthEstimation';\n\nexport type {\n Camera,\n CameraConfig,\n VideoQuality,\n CameraFacingDirection,\n} from './hooks/useCamera';\nexport { useCamera } from './hooks/useCamera';\n\nexport { useMicrophone } from './hooks/useMicrophone';\n\nexport { useRTCStatistics } from './stats/useRTCStatistics';\n\nexport type {\n ScreencastOptions,\n ScreencastQuality,\n} from './hooks/useScreencast';\nexport { useScreencast } from './hooks/useScreencast';\n\nexport type { ReconnectionStatus } from './hooks/useReconnection';\nexport { useReconnection } from './hooks/useReconnection';\n\nexport { updatePeerMetadata } from './common/metadata';\n\nexport type { LoggingSeverity } from './common/webRTC';\nexport {\n changeWebRTCLoggingSeverity,\n setTargetTrackEncoding,\n} from './common/webRTC';\n\nexport { joinRoom, leaveRoom } from './common/client';\n\nexport type { VideoPreviewViewProps } from './components/VideoPreviewView';\nexport { VideoPreviewView } from './components/VideoPreviewView';\n\nexport type { VideoRendererProps } from './components/VideoRendererView';\nexport { VideoRendererView } from './components/VideoRendererView';\n\nexport { AndroidForegroundServiceType } from './types';\nexport {\n startForegroundService,\n stopForegroundService,\n} from './utils/foregroundService';\n\nexport type {\n TrackBandwidthLimit,\n TrackEncoding,\n SimulcastBandwidthLimit,\n BandwidthLimit,\n SimulcastConfig,\n VideoLayout,\n} from './types';\n"]}
package/build/types.d.ts CHANGED
@@ -39,5 +39,30 @@ declare const brand: unique symbol;
39
39
  export type Brand<T, TBrand extends string> = T & {
40
40
  [brand]: TBrand;
41
41
  };
42
+ /**
43
+ * Enum used to set the foreground service types identifying the work done by the service.
44
+ * See Android's [foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types) documentation.
45
+ */
46
+ export declare enum AndroidForegroundServiceType {
47
+ FOREGROUND_SERVICE_TYPE_CAMERA = 64,
48
+ FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION = 32,
49
+ FOREGROUND_SERVICE_TYPE_MICROPHONE = 128
50
+ }
51
+ /**
52
+ * A type representing the options required for configuring the foreground service.
53
+ *
54
+ * @param channelId The id of the channel. Must be unique per package.
55
+ * @param channelName The user visible name of the channel.
56
+ * @param notificationTitle The title (first row) of the notification, in a standard notification.
57
+ * @param notificationContent The text (second row) of the notification, in a standard notification.
58
+ * @param foregroundServiceTypes The type of foreground service to launch.
59
+ */
60
+ export type ForegroundServiceOptions = {
61
+ channelId: string;
62
+ channelName: string;
63
+ notificationTitle: string;
64
+ notificationContent: string;
65
+ foregroundServiceTypes: AndroidForegroundServiceType[];
66
+ };
42
67
  export {};
43
68
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AAEzC,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,eAAe,EAAE,aAAa,EAAE,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,uBAAuB,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAGtD,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AACnC,MAAM,MAAM,KAAK,CAAC,CAAC,EAA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AW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,4BAA4B,EAAE,CAAC;CACxD,CAAC"}
package/build/types.js CHANGED
@@ -1,2 +1,11 @@
1
- export {};
1
+ /**
2
+ * Enum used to set the foreground service types identifying the work done by the service.
3
+ * See Android's [foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types) documentation.
4
+ */
5
+ export var AndroidForegroundServiceType;
6
+ (function (AndroidForegroundServiceType) {
7
+ AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CAMERA"] = 64] = "FOREGROUND_SERVICE_TYPE_CAMERA";
8
+ AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION"] = 32] = "FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION";
9
+ AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MICROPHONE"] = 128] = "FOREGROUND_SERVICE_TYPE_MICROPHONE";
10
+ })(AndroidForegroundServiceType || (AndroidForegroundServiceType = {}));
2
11
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["// global\nexport type VideoLayout = 'FILL' | 'FIT';\n\nexport type TrackEncoding = 'l' | 'm' | 'h';\n\n/**\n * A type describing simulcast configuration.\n *\n * At the moment, simulcast track is initialized in three versions - low, medium and high.\n * High resolution is the original track resolution, while medium and low resolutions are\n * the original track resolution scaled down by 2 and 4 respectively.\n */\nexport type SimulcastConfig = {\n /**\n * whether to simulcast track or not. By default simulcast is disabled.\n */\n enabled: boolean;\n /**\n * list of active encodings. Encoding can be one of `\"h\"` (original encoding), `\"m\"` (scaled down x2), `\"l\"` (scaled down x4).\n */\n activeEncodings: TrackEncoding[];\n};\n\n/**\n * Type describing maximal bandwidth that can be used, in kbps. 0 is interpreted as unlimited bandwidth.\n */\nexport type BandwidthLimit = number;\n\n/**\n * Type describing bandwidth limit for simulcast track. It is a mapping `encoding -> BandwidthLimit`. If encoding isn't present in this mapping,\n * it will be assumed that this particular encoding shouldn't have any bandwidth limit.\n */\nexport type SimulcastBandwidthLimit = Record<TrackEncoding, BandwidthLimit>;\n\n/**\n * A type describing bandwidth limitation of a track, including simulcast and non-simulcast tracks. Can be `BandwidthLimit` or `SimulcastBandwidthLimit`.\n */\nexport type TrackBandwidthLimit = BandwidthLimit | SimulcastBandwidthLimit;\n\nexport type TrackMetadata = {\n active: boolean;\n type: 'audio' | 'camera' | 'screensharing';\n};\n\nexport type GenericMetadata = Record<string, unknown>;\n\n// branded types are useful for restricting where given value can be passed\ndeclare const brand: unique symbol;\nexport type Brand<T, TBrand extends string> = T & { [brand]: TBrand };\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkDA;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,oIAAmC,CAAA;IACnC,wJAA6C,CAAA;IAC7C,6IAAwC,CAAA;AAC1C,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC","sourcesContent":["// global\nexport type VideoLayout = 'FILL' | 'FIT';\n\nexport type TrackEncoding = 'l' | 'm' | 'h';\n\n/**\n * A type describing simulcast configuration.\n *\n * At the moment, simulcast track is initialized in three versions - low, medium and high.\n * High resolution is the original track resolution, while medium and low resolutions are\n * the original track resolution scaled down by 2 and 4 respectively.\n */\nexport type SimulcastConfig = {\n /**\n * whether to simulcast track or not. By default simulcast is disabled.\n */\n enabled: boolean;\n /**\n * list of active encodings. Encoding can be one of `\"h\"` (original encoding), `\"m\"` (scaled down x2), `\"l\"` (scaled down x4).\n */\n activeEncodings: TrackEncoding[];\n};\n\n/**\n * Type describing maximal bandwidth that can be used, in kbps. 0 is interpreted as unlimited bandwidth.\n */\nexport type BandwidthLimit = number;\n\n/**\n * Type describing bandwidth limit for simulcast track. It is a mapping `encoding -> BandwidthLimit`. If encoding isn't present in this mapping,\n * it will be assumed that this particular encoding shouldn't have any bandwidth limit.\n */\nexport type SimulcastBandwidthLimit = Record<TrackEncoding, BandwidthLimit>;\n\n/**\n * A type describing bandwidth limitation of a track, including simulcast and non-simulcast tracks. Can be `BandwidthLimit` or `SimulcastBandwidthLimit`.\n */\nexport type TrackBandwidthLimit = BandwidthLimit | SimulcastBandwidthLimit;\n\nexport type TrackMetadata = {\n active: boolean;\n type: 'audio' | 'camera' | 'screensharing';\n};\n\nexport type GenericMetadata = Record<string, unknown>;\n\n// branded types are useful for restricting where given value can be passed\ndeclare const brand: unique symbol;\nexport type Brand<T, TBrand extends string> = T & { [brand]: TBrand };\n\n/**\n * Enum used to set the foreground service types identifying the work done by the service.\n * See Android's [foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types) documentation.\n */\nexport enum AndroidForegroundServiceType {\n FOREGROUND_SERVICE_TYPE_CAMERA = 64,\n FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION = 32,\n FOREGROUND_SERVICE_TYPE_MICROPHONE = 128,\n}\n\n/**\n * A type representing the options required for configuring the foreground service.\n *\n * @param channelId The id of the channel. Must be unique per package.\n * @param channelName The user visible name of the channel.\n * @param notificationTitle The title (first row) of the notification, in a standard notification.\n * @param notificationContent The text (second row) of the notification, in a standard notification.\n * @param foregroundServiceTypes The type of foreground service to launch.\n */\nexport type ForegroundServiceOptions = {\n channelId: string;\n channelName: string;\n notificationTitle: string;\n notificationContent: string;\n foregroundServiceTypes: AndroidForegroundServiceType[];\n};\n"]}
@@ -0,0 +1,30 @@
1
+ import { ForegroundServiceOptions } from '../types';
2
+ /**
3
+ * Launches a foreground service on Android.
4
+ * Does nothing on other platforms.
5
+ *
6
+ * @remarks
7
+ * You must have have the following permissions enabled before calling this function:
8
+ * @example
9
+ ```
10
+ "android.permission.FOREGROUND_SERVICE"
11
+ "android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
12
+ "android.permission.FOREGROUND_SERVICE_CAMERA"
13
+ "android.permission.FOREGROUND_SERVICE_MICROPHONE"
14
+ "android.permission.POST_NOTIFICATIONS"
15
+ *```
16
+ * as well as FishjamForegroundService in your AndroidManifest:
17
+ * @example
18
+ ```
19
+ <service android:name="io.fishjam.reactnative.FishjamForegroundService" android:foregroundServiceType="camera|microphone|mediaProjection"/>
20
+ ```
21
+ */
22
+ export declare const startForegroundService: (options: ForegroundServiceOptions) => void;
23
+ /**
24
+ * Stops previously launched Android foreground service.
25
+ * @see {@link startForegroundService} for further information.
26
+ *
27
+ * Does nothing on other platforms.
28
+ */
29
+ export declare const stopForegroundService: () => void;
30
+ //# sourceMappingURL=foregroundService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foregroundService.d.ts","sourceRoot":"","sources":["../../src/utils/foregroundService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;MAmBM;AACN,eAAO,MAAM,sBAAsB,YAAa,wBAAwB,SAKvE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,YAKjC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { Platform } from 'react-native';
2
+ import RNFishjamClientModule from '../RNFishjamClientModule';
3
+ /**
4
+ * Launches a foreground service on Android.
5
+ * Does nothing on other platforms.
6
+ *
7
+ * @remarks
8
+ * You must have have the following permissions enabled before calling this function:
9
+ * @example
10
+ ```
11
+ "android.permission.FOREGROUND_SERVICE"
12
+ "android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
13
+ "android.permission.FOREGROUND_SERVICE_CAMERA"
14
+ "android.permission.FOREGROUND_SERVICE_MICROPHONE"
15
+ "android.permission.POST_NOTIFICATIONS"
16
+ *```
17
+ * as well as FishjamForegroundService in your AndroidManifest:
18
+ * @example
19
+ ```
20
+ <service android:name="io.fishjam.reactnative.FishjamForegroundService" android:foregroundServiceType="camera|microphone|mediaProjection"/>
21
+ ```
22
+ */
23
+ export const startForegroundService = (options) => {
24
+ if (Platform.OS !== 'android') {
25
+ return;
26
+ }
27
+ RNFishjamClientModule.startForegroundService(options);
28
+ };
29
+ /**
30
+ * Stops previously launched Android foreground service.
31
+ * @see {@link startForegroundService} for further information.
32
+ *
33
+ * Does nothing on other platforms.
34
+ */
35
+ export const stopForegroundService = () => {
36
+ if (Platform.OS !== 'android') {
37
+ return;
38
+ }
39
+ RNFishjamClientModule.stopForegroundService();
40
+ };
41
+ //# sourceMappingURL=foregroundService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foregroundService.js","sourceRoot":"","sources":["../../src/utils/foregroundService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;MAmBM;AACN,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAiC,EAAE,EAAE;IAC1E,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,qBAAqB,CAAC,qBAAqB,EAAE,CAAC;AAChD,CAAC,CAAC","sourcesContent":["import { Platform } from 'react-native';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\nimport { ForegroundServiceOptions } from '../types';\n\n/**\n * Launches a foreground service on Android.\n * Does nothing on other platforms.\n * \n * @remarks\n * You must have have the following permissions enabled before calling this function:\n * @example\n ```\n \"android.permission.FOREGROUND_SERVICE\"\n \"android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION\"\n \"android.permission.FOREGROUND_SERVICE_CAMERA\"\n \"android.permission.FOREGROUND_SERVICE_MICROPHONE\"\n \"android.permission.POST_NOTIFICATIONS\"\n *```\n * as well as FishjamForegroundService in your AndroidManifest:\n * @example\n ```\n <service android:name=\"io.fishjam.reactnative.FishjamForegroundService\" android:foregroundServiceType=\"camera|microphone|mediaProjection\"/>\n ```\n */\nexport const startForegroundService = (options: ForegroundServiceOptions) => {\n if (Platform.OS !== 'android') {\n return;\n }\n RNFishjamClientModule.startForegroundService(options);\n};\n\n/**\n * Stops previously launched Android foreground service.\n * @see {@link startForegroundService} for further information.\n *\n * Does nothing on other platforms.\n */\nexport const stopForegroundService = () => {\n if (Platform.OS !== 'android') {\n return;\n }\n RNFishjamClientModule.stopForegroundService();\n};\n"]}
@@ -9,9 +9,9 @@
9
9
  },
10
10
  "android": {
11
11
  "modules": [
12
- "org.membraneframework.reactnative.RNFishjamClientModule",
13
- "org.membraneframework.reactnative.VideoPreviewViewModule",
14
- "org.membraneframework.reactnative.VideoRendererViewModule"
12
+ "io.fishjam.reactnative.RNFishjamClientModule",
13
+ "io.fishjam.reactnative.VideoPreviewViewModule",
14
+ "io.fishjam.reactnative.VideoRendererViewModule"
15
15
  ]
16
16
  }
17
17
  }
@@ -21,7 +21,7 @@ class RNFishjamClient: FishjamClientListener {
21
21
  var screencastSimulcastConfig: SimulcastConfig = SimulcastConfig()
22
22
  var screencastMaxBandwidth: TrackBandwidthLimit = .BandwidthLimit(0)
23
23
 
24
- var captureDeviceId: String? = nil
24
+ var cameraId: String? = nil
25
25
 
26
26
  var audioSessionMode: AVAudioSession.Mode = AVAudioSession.Mode.videoChat
27
27
  var errorMessage: String?
@@ -173,12 +173,15 @@ class RNFishjamClient: FishjamClientListener {
173
173
  }
174
174
 
175
175
  func onAuthSuccess() {
176
- joinRoom()
176
+ join()
177
177
  }
178
178
 
179
- func connect(url: String, peerToken: String, peerMetadata: [String: Any], config: ConnectConfig, promise: Promise) {
179
+ func joinRoom(
180
+ url: String, participantToken: String, participantMetadata: [String: Any], config: ConnectConfig,
181
+ promise: Promise
182
+ ) {
180
183
  connectPromise = promise
181
- localUserMetadata = peerMetadata.toMetadata()
184
+ localUserMetadata = participantMetadata.toMetadata()
182
185
 
183
186
  let reconnectConfig = FishjamCloudClient.ReconnectConfig(
184
187
  maxAttempts: config.reconnectConfig.maxAttempts, initialDelayMs: config.reconnectConfig.initialDelayMs,
@@ -186,12 +189,13 @@ class RNFishjamClient: FishjamClientListener {
186
189
 
187
190
  RNFishjamClient.fishjamClient?.connect(
188
191
  config: FishjamCloudClient.ConnectConfig(
189
- websocketUrl: url, token: peerToken, peerMetadata: .init(peerMetadata), reconnectConfig: reconnectConfig
192
+ websocketUrl: url, token: participantToken, participantMetadata: .init(participantMetadata),
193
+ reconnectConfig: reconnectConfig
190
194
  ))
191
195
 
192
196
  }
193
197
 
194
- func joinRoom() {
198
+ func join() {
195
199
  RNFishjamClient.fishjamClient?.join(peerMetadata: localUserMetadata)
196
200
  }
197
201
 
@@ -224,7 +228,7 @@ class RNFishjamClient: FishjamClientListener {
224
228
  return RNFishjamClient.fishjamClient!.createVideoTrack(
225
229
  videoParameters: videoParameters,
226
230
  metadata: config.videoTrackMetadata.toMetadata(),
227
- captureDeviceName: config.captureDeviceId
231
+ captureDeviceName: config.cameraId
228
232
  )
229
233
  }
230
234
 
@@ -236,9 +240,10 @@ class RNFishjamClient: FishjamClientListener {
236
240
  emitEvent(name: eventName, data: isCameraEnabledMap)
237
241
  }
238
242
 
239
- func toggleCamera() throws {
243
+ func toggleCamera() throws -> Bool {
240
244
  try ensureVideoTrack()
241
245
  setCameraTrackState(getLocalVideoTrack()!, enabled: !isCameraOn)
246
+ return isCameraOn
242
247
  }
243
248
 
244
249
  func flipCamera() throws {
@@ -246,9 +251,9 @@ class RNFishjamClient: FishjamClientListener {
246
251
  getLocalVideoTrack()?.flipCamera()
247
252
  }
248
253
 
249
- func switchCamera(captureDeviceId: String) throws {
254
+ func switchCamera(cameraId: String) throws {
250
255
  try ensureVideoTrack()
251
- getLocalVideoTrack()?.switchCamera(deviceId: captureDeviceId)
256
+ getLocalVideoTrack()?.switchCamera(deviceId: cameraId)
252
257
 
253
258
  }
254
259
 
@@ -314,8 +319,7 @@ class RNFishjamClient: FishjamClientListener {
314
319
  description: "No app group name set. Please set AppGroupName in Info.plist")
315
320
  }
316
321
 
317
- guard !isScreencastOn
318
- else {
322
+ guard !isScreencastOn else {
319
323
  DispatchQueue.main.async {
320
324
  RPSystemBroadcastPickerView.show(for: screencastExtensionBundleId)
321
325
  }
@@ -334,12 +338,8 @@ class RNFishjamClient: FishjamClientListener {
334
338
  videoParameters: videoParameters,
335
339
  metadata: screencastMetadata,
336
340
  onStart: { [weak self] screencastTrack in
337
- guard let self = self else {
338
- DispatchQueue.main.async {
339
- RPSystemBroadcastPickerView.show(for: screencastExtensionBundleId)
340
- }
341
- return
342
- }
341
+ guard let self = self else { return }
342
+
343
343
  do {
344
344
  //not sure should it be here, or outside or where?
345
345
  try setScreencastTrackState(screencastTrack, enabled: true)
@@ -352,9 +352,7 @@ class RNFishjamClient: FishjamClientListener {
352
352
 
353
353
  },
354
354
  onStop: { [weak self] screencastTrack in
355
- guard let self = self else {
356
- return
357
- }
355
+ guard let self = self else { return }
358
356
  do {
359
357
  //not sure should it be here, or outside or where?
360
358
  try setScreencastTrackState(screencastTrack, enabled: false)
@@ -401,7 +399,7 @@ class RNFishjamClient: FishjamClientListener {
401
399
  return [
402
400
  "id": track.id,
403
401
  "type": "Video",
404
- "metadata": track.metadata,
402
+ "metadata": track.metadata.toDict(),
405
403
  "encoding": track.encoding?.description,
406
404
  "encodingReason": track.encodingReason?.rawValue,
407
405
  ]
@@ -410,7 +408,7 @@ class RNFishjamClient: FishjamClientListener {
410
408
  return [
411
409
  "id": track.id,
412
410
  "type": "Audio",
413
- "metadata": track.metadata,
411
+ "metadata": track.metadata.toDict(),
414
412
  "vadStatus": track.vadStatus.rawValue,
415
413
  ]
416
414
 
@@ -418,21 +416,21 @@ class RNFishjamClient: FishjamClientListener {
418
416
  return [
419
417
  "id": track.id,
420
418
  "type": "Video",
421
- "metadata": track.metadata,
419
+ "metadata": track.metadata.toDict(),
422
420
  ]
423
421
 
424
422
  case let track as LocalScreencastTrack:
425
423
  return [
426
424
  "id": track.id,
427
425
  "type": "Video",
428
- "metadata": track.metadata,
426
+ "metadata": track.metadata.toDict(),
429
427
  ]
430
428
 
431
429
  case let track as LocalAudioTrack:
432
430
  return [
433
431
  "id": track.id,
434
432
  "type": "Audio",
435
- "metadata": track.metadata,
433
+ "metadata": track.metadata.toDict(),
436
434
  ]
437
435
 
438
436
  default:
@@ -446,11 +444,16 @@ class RNFishjamClient: FishjamClientListener {
446
444
  func getCaptureDevices() -> [[String: Any]] {
447
445
  let devices = LocalVideoTrack.getCaptureDevices()
448
446
  return devices.map { device -> [String: Any] in
447
+ let facingDirection =
448
+ switch device.position {
449
+ case .front: "front"
450
+ case .back: "back"
451
+ default: "unspecified"
452
+ }
449
453
  return [
450
454
  "id": device.uniqueID,
451
455
  "name": device.localizedName,
452
- "isFrontFacing": device.position == .front,
453
- "isBackFacing": device.position == .back,
456
+ "facingDirection": facingDirection,
454
457
  ]
455
458
  }
456
459
  }
@@ -706,7 +709,9 @@ class RNFishjamClient: FishjamClientListener {
706
709
  addOrUpdateTrack(track)
707
710
  }
708
711
 
709
- func onTrackAdded(track: Track) {}
712
+ func onTrackAdded(track: Track) {
713
+ emitEndpoints()
714
+ }
710
715
 
711
716
  func onTrackRemoved(track: Track) {
712
717
  emitEndpoints()
@@ -28,7 +28,7 @@ struct CameraConfig: Record {
28
28
  var cameraEnabled: Bool = true
29
29
 
30
30
  @Field
31
- var captureDeviceId: String? = nil
31
+ var cameraId: String? = nil
32
32
  }
33
33
 
34
34
  struct MicrophoneConfig: Record {
@@ -97,10 +97,14 @@ public class RNFishjamClientModule: Module {
97
97
  return client
98
98
  }()
99
99
 
100
- AsyncFunction("connect") {
101
- (url: String, peerToken: String, peerMetadata: [String: Any], config: ConnectConfig, promise: Promise) in
102
- rnFishjamClient.connect(
103
- url: url, peerToken: peerToken, peerMetadata: peerMetadata, config: config, promise: promise)
100
+ AsyncFunction("joinRoom") {
101
+ (
102
+ url: String, participantToken: String, participantMetadata: [String: Any], config: ConnectConfig,
103
+ promise: Promise
104
+ ) in
105
+ rnFishjamClient.joinRoom(
106
+ url: url, participantToken: participantToken, participantMetadata: participantMetadata, config: config,
107
+ promise: promise)
104
108
  }
105
109
 
106
110
  AsyncFunction("leaveRoom") {
@@ -131,11 +135,11 @@ public class RNFishjamClientModule: Module {
131
135
  try rnFishjamClient.flipCamera()
132
136
  }
133
137
 
134
- AsyncFunction("switchCamera") { (captureDeviceId: String) in
135
- try rnFishjamClient.switchCamera(captureDeviceId: captureDeviceId)
138
+ AsyncFunction("switchCamera") { (cameraId: String) in
139
+ try rnFishjamClient.switchCamera(cameraId: cameraId)
136
140
  }
137
141
 
138
- AsyncFunction("getCaptureDevices") {
142
+ Property("cameras") {
139
143
  rnFishjamClient.getCaptureDevices()
140
144
  }
141
145
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fishjam-cloud/react-native-client",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "A React Native client for Fishjam Cloud",
5
5
  "author": "Fishjam Cloud Team",
6
6
  "license": "Apache-2.0",
7
7
  "main": "build/index.js",
8
8
  "types": "build/index.d.ts",
9
9
  "scripts": {
10
- "build": "expo-module build",
10
+ "build": "EXPO_NONINTERACTIVE=1 sh -c 'expo-module build && expo-module build plugin'",
11
11
  "clean": "expo-module clean",
12
12
  "lint": "sh ./scripts/lint.sh",
13
13
  "lint:check": "sh ./scripts/lint_check.sh",
@@ -31,7 +31,7 @@
31
31
  "bugs": {
32
32
  "url": "https://github.com/fishjam-cloud/mobile-client-sdk/issues"
33
33
  },
34
- "homepage": "https://github.com/fishjam-cloud/mobile-client-sdk#readme",
34
+ "homepage": "https://fishjam.io",
35
35
  "publishConfig": {
36
36
  "registry": "https://registry.npmjs.org/",
37
37
  "access": "public"
@@ -47,20 +47,18 @@
47
47
  "@types/phoenix": "^1.6.5",
48
48
  "@types/promise-fs": "^2.1.2",
49
49
  "@types/react": "^18.3.5",
50
- "expo": "^50.0.20",
51
- "expo-module-scripts": "^3.0.4",
52
- "expo-modules-core": "~1.11.8",
53
- "husky": "^9.1.5",
50
+ "expo": "^51.0.32",
51
+ "expo-module-scripts": "^3.5.2",
52
+ "expo-modules-core": "^1.12.24",
53
+ "husky": "^9.1.6",
54
54
  "jest": "^29.6.1",
55
55
  "jest-environment-jsdom": "^29.6.1",
56
- "jest-expo": "^50.0.2",
56
+ "jest-expo": "^51.0.4",
57
57
  "jest-websocket-mock": "^2.4.0",
58
- "lint-staged": "^15.2.10",
59
58
  "pod-install": "^0.2.0",
60
- "react": "18.3.1",
61
- "react-dom": "18.3.1",
62
- "react-native": "0.73.4",
63
- "release-it": "^17.6.0",
59
+ "react": "^18.2.0",
60
+ "react-dom": "^18.3.1",
61
+ "react-native": "^0.75.2",
64
62
  "ts-proto": "^2.1.0",
65
63
  "typedoc": "^0.26.6",
66
64
  "typedoc-plugin-mark-react-functional-components": "^0.2.2",
@@ -79,9 +77,16 @@
79
77
  ],
80
78
  "testEnvironment": "jsdom"
81
79
  },
82
- "lint-staged": {
83
- "*.(js|ts|tsx)": [
84
- "yarn lint:check"
85
- ]
86
- }
80
+ "files": [
81
+ "build/",
82
+ "android/build.gradle",
83
+ "android/src/",
84
+ "ios/*.swift",
85
+ "ios/RNFishjamClient.podspec",
86
+ "plugin/build/",
87
+ "app.plugin.js",
88
+ "expo-module.config.json",
89
+ "README.md",
90
+ "!**/node_modules"
91
+ ]
87
92
  }
package/.eslintignore DELETED
@@ -1,7 +0,0 @@
1
- android/*
2
- ios/*
3
- build/*
4
- example/*
5
- plugin/build/*
6
- protos/*
7
- src/protos/*
package/.eslintrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.js"],
3
- "rules": {
4
- "@typescript-eslint/no-non-null-assertion": "off",
5
- },
6
- }
package/.prettierrc DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "bracketSameLine": true,
3
- "proseWrap": "always",
4
- "quoteProps": "consistent",
5
- "singleQuote": true,
6
- "tabWidth": 2,
7
- "trailingComma": "all",
8
- "useTabs": false
9
- }
package/.watchmanconfig DELETED
@@ -1 +0,0 @@
1
- {}
@@ -1,9 +0,0 @@
1
- [*.{kt,kts}]
2
- ktlint_code_style = ktlint_official
3
- ktlint_standard_no-wildcard-imports = disabled
4
- ktlint_standard_filename = disabled
5
- ktlint_standard_function-naming = disabled
6
- ktlint_standard_property-naming = disabled
7
- ij_kotlin_allow_trailing_comma = false
8
- ij_kotlin_allow_trailing_comma_on_call_site = false
9
- ktlint_standard_function-literal = disabled
@@ -1,2 +0,0 @@
1
- <manifest>
2
- </manifest>