@fishjam-cloud/react-native-client 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +7 -6
- package/android/build.gradle +3 -3
- package/android/src/main/java/io/fishjam/reactnative/EmitableEvents.kt +25 -12
- package/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +50 -33
- package/android/src/main/java/io/fishjam/reactnative/RNFishjamClientModule.kt +7 -16
- package/android/src/main/java/io/fishjam/reactnative/VideoPreviewView.kt +13 -3
- package/build/RNFishjamClientModule.d.ts +10 -8
- package/build/RNFishjamClientModule.d.ts.map +1 -1
- package/build/RNFishjamClientModule.js.map +1 -1
- package/build/common/client.d.ts +3 -3
- package/build/common/client.d.ts.map +1 -1
- package/build/common/client.js +4 -4
- package/build/common/client.js.map +1 -1
- package/build/common/metadata.d.ts +3 -3
- package/build/common/metadata.d.ts.map +1 -1
- package/build/common/metadata.js +4 -4
- package/build/common/metadata.js.map +1 -1
- package/build/common/webRTC.d.ts +0 -8
- package/build/common/webRTC.d.ts.map +1 -1
- package/build/common/webRTC.js +0 -9
- package/build/common/webRTC.js.map +1 -1
- package/build/components/VideoRendererView.d.ts +1 -1
- package/build/components/VideoRendererView.js +1 -1
- package/build/components/VideoRendererView.js.map +1 -1
- package/build/debug/common/webRTC.d.ts +9 -0
- package/build/debug/common/webRTC.d.ts.map +1 -0
- package/build/debug/common/webRTC.js +11 -0
- package/build/debug/common/webRTC.js.map +1 -0
- package/build/debug/index.d.ts +4 -0
- package/build/debug/index.d.ts.map +1 -0
- package/build/debug/index.js +3 -0
- package/build/debug/index.js.map +1 -0
- package/build/debug/stats/types.d.ts.map +1 -0
- package/build/debug/stats/types.js.map +1 -0
- package/build/debug/stats/useRTCStatistics.d.ts.map +1 -0
- package/build/{stats → debug/stats}/useRTCStatistics.js +1 -1
- package/build/debug/stats/useRTCStatistics.js.map +1 -0
- package/build/hooks/useFishjamEvent.d.ts +1 -0
- package/build/hooks/useFishjamEvent.d.ts.map +1 -1
- package/build/hooks/useFishjamEvent.js +1 -0
- package/build/hooks/useFishjamEvent.js.map +1 -1
- package/build/hooks/usePeerStatus.d.ts +19 -0
- package/build/hooks/usePeerStatus.d.ts.map +1 -0
- package/build/hooks/usePeerStatus.js +18 -0
- package/build/hooks/usePeerStatus.js.map +1 -0
- package/build/hooks/{useParticipants.d.ts → usePeers.d.ts} +11 -11
- package/build/hooks/usePeers.d.ts.map +1 -0
- package/build/hooks/usePeers.js +34 -0
- package/build/hooks/usePeers.js.map +1 -0
- package/build/index.d.ts +5 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/debug/package.json +4 -0
- package/ios/Events.swift +29 -13
- package/ios/RNFishjamClient.podspec +1 -1
- package/ios/RNFishjamClient.swift +58 -55
- package/ios/RNFishjamClientModule.swift +7 -15
- package/ios/VideoPreviewView.swift +27 -9
- package/package.json +4 -3
- package/plugin/build/withFishjamIos.js +2 -2
- package/build/hooks/useParticipants.d.ts.map +0 -1
- package/build/hooks/useParticipants.js +0 -34
- package/build/hooks/useParticipants.js.map +0 -1
- package/build/stats/types.d.ts.map +0 -1
- package/build/stats/types.js.map +0 -1
- package/build/stats/useRTCStatistics.d.ts.map +0 -1
- package/build/stats/useRTCStatistics.js.map +0 -1
- /package/build/{stats → debug/stats}/types.d.ts +0 -0
- /package/build/{stats → debug/stats}/types.js +0 -0
- /package/build/{stats → debug/stats}/useRTCStatistics.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNFishjamClientModule.js","sourceRoot":"","sources":["../src/RNFishjamClientModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"RNFishjamClientModule.js","sourceRoot":"","sources":["../src/RNFishjamClientModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA6EtE,MAAM,YAAY,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC,CAAC;AAEvE,eAAe,YAA8C,CAAC","sourcesContent":["import { EventEmitter, requireNativeModule } from 'expo-modules-core';\nimport { NativeModule } from 'react-native';\n\nimport type { RTCStats } from './debug/stats/types';\nimport type { ForegroundServiceOptions, SimulcastConfig } from './types';\nimport type { CameraConfigInternal, Camera } from './hooks/useCamera';\nimport type { Peer } from './hooks/usePeers';\nimport type { ScreenShareOptionsInternal } from './hooks/useScreenShare';\nimport type { ConnectionConfig } from './common/client';\nimport { PeerStatus } from './hooks/usePeerStatus';\n\ntype Metadata = { [key: string]: any };\n\ntype RNFishjamClient = {\n isMicrophoneOn: boolean;\n isCameraOn: boolean;\n isScreenShareOn: boolean;\n cameras: ReadonlyArray<Camera>;\n peerStatus: PeerStatus;\n\n joinRoom: (\n url: string,\n peerToken: string,\n peerMetadata: Metadata,\n config: ConnectionConfig,\n ) => Promise<void>;\n leaveRoom: () => Promise<void>;\n startCamera: (config: CameraConfigInternal) => Promise<void>;\n toggleMicrophone: () => Promise<boolean>;\n toggleCamera: () => Promise<boolean>;\n flipCamera: () => Promise<void>;\n switchCamera: (cameraId: string) => Promise<void>;\n handleScreenSharePermission: () => Promise<'granted' | 'denied'>;\n toggleScreenShare: (\n screenShareOptions: Partial<ScreenShareOptionsInternal>,\n ) => Promise<void>;\n getPeers: <PeerMetadataType extends Metadata>() => Promise<\n Peer<PeerMetadataType>[]\n >;\n updatePeerMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n updateVideoTrackMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n updateAudioTrackMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n updateScreenShareTrackMetadata: <MetadataType extends Metadata>(\n metadata: MetadataType,\n ) => Promise<void>;\n setOutputAudioDevice: (audioDevice: string) => Promise<void>;\n startAudioSwitcher: () => Promise<void>;\n stopAudioSwitcher: () => Promise<void>;\n selectAudioSessionMode: (sessionMode: string) => Promise<void>;\n showAudioRoutePicker: () => Promise<void>;\n toggleScreenShareTrackEncoding: (\n encoding: string,\n ) => Promise<SimulcastConfig>;\n setScreenShareTrackBandwidth: (bandwidth: number) => Promise<void>;\n setScreenShareTrackEncodingBandwidth: (\n encoding: string,\n bandwidth: number,\n ) => Promise<void>;\n setTargetTrackEncoding: (trackId: string, encoding: string) => Promise<void>;\n toggleVideoTrackEncoding: (encoding: string) => Promise<SimulcastConfig>;\n setVideoTrackEncodingBandwidth: (\n encoding: string,\n bandwidth: number,\n ) => Promise<void>;\n setVideoTrackBandwidth: (bandwidth: number) => Promise<void>;\n changeWebRTCLoggingSeverity: (severity: string) => Promise<void>;\n getStatistics: () => Promise<RTCStats>;\n startForegroundService: (options: ForegroundServiceOptions) => void;\n stopForegroundService: () => void;\n};\n\nconst nativeModule = requireNativeModule('RNFishjamClient');\nexport const nativeModuleEventEmitter = new EventEmitter(nativeModule);\n\nexport default nativeModule as RNFishjamClient & NativeModule;\n"]}
|
package/build/common/client.d.ts
CHANGED
|
@@ -16,12 +16,12 @@ export type ConnectionConfig = {
|
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* @param url fishjam Url
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
19
|
+
* @param peerToken token received from server (or Room Manager)
|
|
20
|
+
* @param peerMetadata string indexed record with metadata, that will be available to all other peers
|
|
21
21
|
* @param config additional connection configuration
|
|
22
22
|
* @category Connection
|
|
23
23
|
*/
|
|
24
|
-
export declare function joinRoom<
|
|
24
|
+
export declare function joinRoom<PeerMetadata extends GenericMetadata = GenericMetadata>(url: string, peerToken: string, peerMetadata?: PeerMetadata, config?: ConnectionConfig): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* @category Connection
|
|
27
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,YAAY,SAAS,eAAe,GAAG,eAAe,EAEtD,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,YAAY,EAC3B,MAAM,CAAC,EAAE,gBAAgB,iBAQ1B;AACD;;GAEG;AACH,wBAAsB,SAAS,kBAE9B"}
|
package/build/common/client.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import RNFishjamClientModule from '../RNFishjamClientModule';
|
|
2
2
|
/**
|
|
3
3
|
* @param url fishjam Url
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
4
|
+
* @param peerToken token received from server (or Room Manager)
|
|
5
|
+
* @param peerMetadata string indexed record with metadata, that will be available to all other peers
|
|
6
6
|
* @param config additional connection configuration
|
|
7
7
|
* @category Connection
|
|
8
8
|
*/
|
|
9
|
-
export async function joinRoom(url,
|
|
10
|
-
await RNFishjamClientModule.joinRoom(url,
|
|
9
|
+
export async function joinRoom(url, peerToken, peerMetadata, config) {
|
|
10
|
+
await RNFishjamClientModule.joinRoom(url, peerToken, peerMetadata ?? {}, config ?? {});
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* @category Connection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAkB7D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAG5B,GAAW,EACX,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAkB7D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAG5B,GAAW,EACX,SAAiB,EACjB,YAA2B,EAC3B,MAAyB;IAEzB,MAAM,qBAAqB,CAAC,QAAQ,CAClC,GAAG,EACH,SAAS,EACT,YAAY,IAAI,EAAE,EAClB,MAAM,IAAI,EAAE,CACb,CAAC;AACJ,CAAC;AACD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,qBAAqB,CAAC,SAAS,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["import { GenericMetadata } from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\n\nexport type ConnectionConfig = {\n /**\n * Configuration for automatic reconnection\n * sdk uses a linear backoff algorithm, that is the formula\n * for the delay of the nth attempt is\n * n * delayMs + initialDelayMs\n *\n * Pass 0 for maxAttempts to disable automatic reconnection\n */\n reconnectConfig?: {\n maxAttempts?: number;\n initialDelayMs?: number;\n delayMs?: number;\n };\n};\n\n/**\n * @param url fishjam Url\n * @param peerToken token received from server (or Room Manager)\n * @param peerMetadata string indexed record with metadata, that will be available to all other peers\n * @param config additional connection configuration\n * @category Connection\n */\nexport async function joinRoom<\n PeerMetadata extends GenericMetadata = GenericMetadata,\n>(\n url: string,\n peerToken: string,\n peerMetadata?: PeerMetadata,\n config?: ConnectionConfig,\n) {\n await RNFishjamClientModule.joinRoom(\n url,\n peerToken,\n peerMetadata ?? {},\n config ?? {},\n );\n}\n/**\n * @category Connection\n */\nexport async function leaveRoom() {\n await RNFishjamClientModule.leaveRoom();\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GenericMetadata } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Updates metadata send to other
|
|
4
|
-
* @param
|
|
3
|
+
* Updates metadata send to other peers
|
|
4
|
+
* @param peerMetadata string indexed record with metadata, that will be available to all other peers
|
|
5
5
|
* @category Connection
|
|
6
6
|
*/
|
|
7
|
-
export declare function updatePeerMetadata<
|
|
7
|
+
export declare function updatePeerMetadata<PeerMetadata extends GenericMetadata = GenericMetadata>(peerMetadata: PeerMetadata): Promise<void>;
|
|
8
8
|
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,SAAS,eAAe,GAAG,eAAe,EACtD,YAAY,EAAE,YAAY,iBAE3B"}
|
package/build/common/metadata.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import RNFishjamClientModule from '../RNFishjamClientModule';
|
|
2
2
|
/**
|
|
3
|
-
* Updates metadata send to other
|
|
4
|
-
* @param
|
|
3
|
+
* Updates metadata send to other peers
|
|
4
|
+
* @param peerMetadata string indexed record with metadata, that will be available to all other peers
|
|
5
5
|
* @category Connection
|
|
6
6
|
*/
|
|
7
|
-
export async function updatePeerMetadata(
|
|
8
|
-
await RNFishjamClientModule.updatePeerMetadata(
|
|
7
|
+
export async function updatePeerMetadata(peerMetadata) {
|
|
8
|
+
await RNFishjamClientModule.updatePeerMetadata(peerMetadata);
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAEtC,
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/common/metadata.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAEtC,YAA0B;IAC1B,MAAM,qBAAqB,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import { GenericMetadata } from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\n\n/**\n * Updates metadata send to other peers\n * @param peerMetadata string indexed record with metadata, that will be available to all other peers\n * @category Connection\n */\nexport async function updatePeerMetadata<\n PeerMetadata extends GenericMetadata = GenericMetadata,\n>(peerMetadata: PeerMetadata) {\n await RNFishjamClientModule.updatePeerMetadata(peerMetadata);\n}\n"]}
|
package/build/common/webRTC.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TrackEncoding } from '../types';
|
|
2
|
-
export type LoggingSeverity = 'verbose' | 'info' | 'warning' | 'error' | 'none';
|
|
3
2
|
/**
|
|
4
3
|
* sets track encoding that server should send to the client library.
|
|
5
4
|
* The encoding will be sent whenever it is available. If chooses encoding is
|
|
@@ -11,11 +10,4 @@ export type LoggingSeverity = 'verbose' | 'info' | 'warning' | 'error' | 'none';
|
|
|
11
10
|
* @category Debugging
|
|
12
11
|
*/
|
|
13
12
|
export declare function setTargetTrackEncoding(trackId: string, encoding: TrackEncoding): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Function that changes level of debugging logs in WebRTC.
|
|
16
|
-
* @param severity to use when displaying logs
|
|
17
|
-
* @returns a promise that is resolved when debug severity is changed
|
|
18
|
-
* @category Debugging
|
|
19
|
-
*/
|
|
20
|
-
export declare function changeWebRTCLoggingSeverity(severity: LoggingSeverity): Promise<void>;
|
|
21
13
|
//# sourceMappingURL=webRTC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webRTC.d.ts","sourceRoot":"","sources":["../../src/common/webRTC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC
|
|
1
|
+
{"version":3,"file":"webRTC.d.ts","sourceRoot":"","sources":["../../src/common/webRTC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,iBAGxB"}
|
package/build/common/webRTC.js
CHANGED
|
@@ -12,13 +12,4 @@ import RNFishjamClientModule from '../RNFishjamClientModule';
|
|
|
12
12
|
export async function setTargetTrackEncoding(trackId, encoding) {
|
|
13
13
|
await RNFishjamClientModule.setTargetTrackEncoding(trackId, encoding);
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Function that changes level of debugging logs in WebRTC.
|
|
17
|
-
* @param severity to use when displaying logs
|
|
18
|
-
* @returns a promise that is resolved when debug severity is changed
|
|
19
|
-
* @category Debugging
|
|
20
|
-
*/
|
|
21
|
-
export function changeWebRTCLoggingSeverity(severity) {
|
|
22
|
-
return RNFishjamClientModule.changeWebRTCLoggingSeverity(severity);
|
|
23
|
-
}
|
|
24
15
|
//# sourceMappingURL=webRTC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webRTC.js","sourceRoot":"","sources":["../../src/common/webRTC.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"webRTC.js","sourceRoot":"","sources":["../../src/common/webRTC.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAe,EACf,QAAuB;IAEvB,MAAM,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import { TrackEncoding } from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\n\n/**\n * sets track encoding that server should send to the client library.\n * The encoding will be sent whenever it is available. If chooses encoding is\n * temporarily unavailable, some other encoding will be sent until choose encoding\n * becomes active again.\n *\n * @param trackId id of a track which encoding you want to select\n * @param encoding encoding to select\n * @category Debugging\n */\nexport async function setTargetTrackEncoding(\n trackId: string,\n encoding: TrackEncoding,\n) {\n await RNFishjamClientModule.setTargetTrackEncoding(trackId, encoding);\n}\n"]}
|
|
@@ -14,7 +14,7 @@ export type VideoRendererProps = {
|
|
|
14
14
|
style?: ViewStyle;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Render video track received from {@link
|
|
17
|
+
* Render video track received from {@link usePeers} hook
|
|
18
18
|
* @category Components
|
|
19
19
|
*/
|
|
20
20
|
export declare const VideoRendererView: React.ForwardRefExoticComponent<VideoRendererProps & React.RefAttributes<React.ComponentType<VideoRendererProps>>>;
|
|
@@ -2,7 +2,7 @@ import { requireNativeViewManager } from 'expo-modules-core';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
const NativeView = requireNativeViewManager('VideoRendererViewModule');
|
|
4
4
|
/**
|
|
5
|
-
* Render video track received from {@link
|
|
5
|
+
* Render video track received from {@link usePeers} hook
|
|
6
6
|
* @category Components
|
|
7
7
|
*/
|
|
8
8
|
export const VideoRendererView = React.forwardRef((props, ref) => (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoRendererView.js","sourceRoot":"","sources":["../../src/components/VideoRendererView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,MAAM,UAAU,GACd,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAG/C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;AAChB,gDAAgD;AAChD,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CACpC,CAAC,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport { ViewStyle } from 'react-native';\n\nimport { VideoLayout } from '../types';\n\nexport type VideoRendererProps = {\n /**\n * id of the video track which you want to render.\n */\n trackId: string;\n /**\n * Video layout inside of the component\n * @default `FILL`\n */\n videoLayout?: VideoLayout;\n style?: ViewStyle;\n};\n\nconst NativeView: React.ComponentType<VideoRendererProps> =\n requireNativeViewManager('VideoRendererViewModule');\n\n/**\n * Render video track received from {@link
|
|
1
|
+
{"version":3,"file":"VideoRendererView.js","sourceRoot":"","sources":["../../src/components/VideoRendererView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,MAAM,UAAU,GACd,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAG/C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;AAChB,gDAAgD;AAChD,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAG,CACpC,CAAC,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport { ViewStyle } from 'react-native';\n\nimport { VideoLayout } from '../types';\n\nexport type VideoRendererProps = {\n /**\n * id of the video track which you want to render.\n */\n trackId: string;\n /**\n * Video layout inside of the component\n * @default `FILL`\n */\n videoLayout?: VideoLayout;\n style?: ViewStyle;\n};\n\nconst NativeView: React.ComponentType<VideoRendererProps> =\n requireNativeViewManager('VideoRendererViewModule');\n\n/**\n * Render video track received from {@link usePeers} hook\n * @category Components\n */\nexport const VideoRendererView = React.forwardRef<\n React.ComponentType<VideoRendererProps>,\n VideoRendererProps\n>((props, ref) => (\n // @ts-expect-error ref prop needs to be updated\n <NativeView {...props} ref={ref} />\n));\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type LoggingSeverity = 'verbose' | 'info' | 'warning' | 'error' | 'none';
|
|
2
|
+
/**
|
|
3
|
+
* Function that changes level of debugging logs in WebRTC.
|
|
4
|
+
* @param severity to use when displaying logs
|
|
5
|
+
* @returns a promise that is resolved when debug severity is changed
|
|
6
|
+
* @category Debugging
|
|
7
|
+
*/
|
|
8
|
+
export declare function changeWebRTCLoggingSeverity(severity: LoggingSeverity): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=webRTC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webRTC.d.ts","sourceRoot":"","sources":["../../../src/debug/common/webRTC.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import RNFishjamClientModule from '../../RNFishjamClientModule';
|
|
2
|
+
/**
|
|
3
|
+
* Function that changes level of debugging logs in WebRTC.
|
|
4
|
+
* @param severity to use when displaying logs
|
|
5
|
+
* @returns a promise that is resolved when debug severity is changed
|
|
6
|
+
* @category Debugging
|
|
7
|
+
*/
|
|
8
|
+
export function changeWebRTCLoggingSeverity(severity) {
|
|
9
|
+
return RNFishjamClientModule.changeWebRTCLoggingSeverity(severity);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=webRTC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webRTC.js","sourceRoot":"","sources":["../../../src/debug/common/webRTC.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,6BAA6B,CAAC;AAIhE;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAyB;IAEzB,OAAO,qBAAqB,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC","sourcesContent":["import RNFishjamClientModule from '../../RNFishjamClientModule';\n\nexport type LoggingSeverity = 'verbose' | 'info' | 'warning' | 'error' | 'none';\n\n/**\n * Function that changes level of debugging logs in WebRTC.\n * @param severity to use when displaying logs\n * @returns a promise that is resolved when debug severity is changed\n * @category Debugging\n */\nexport function changeWebRTCLoggingSeverity(\n severity: LoggingSeverity,\n): Promise<void> {\n return RNFishjamClientModule.changeWebRTCLoggingSeverity(severity);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { useRTCStatistics } from './stats/useRTCStatistics';\n\nexport type { LoggingSeverity } from './common/webRTC';\nexport { changeWebRTCLoggingSeverity } from './common/webRTC';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/debug/stats/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,4BAA4B,EAAE,0BAA0B,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAE/D,MAAM,MAAM,QAAQ,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/debug/stats/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A record of the total time, in seconds,\n * that this stream has spent in each quality limitation state.\n * none: The resolution and/or framerate is not limited.\n * bandwidth: The resolution and/or framerate is primarily limited due to\n * congestion cues during bandwidth estimation.\n * Typical, congestion control algorithms use inter-arrival time,\n * round-trip time, packet or other congestion cues to perform bandwidth estimation.\n * cpu: The resolution and/or framerate is primarily limited due to CPU load.\n * other: The resolution and/or framerate is primarily limited\n * for a reason other than the above.\n */\nexport type QualityLimitationDurations = {\n bandwidth: number;\n cpu: number;\n none: number;\n other: number;\n};\n\nexport type RTCOutboundStats = {\n 'kind': string;\n 'rid': string;\n 'bytesSent': number;\n 'targetBitrate': number;\n 'packetsSent': number;\n 'framesEncoded': number;\n 'framesPerSecond': number;\n 'frameWidth': number;\n 'frameHeight': number;\n 'qualityLimitationDurations': QualityLimitationDurations;\n 'bytesSent/s': number;\n 'packetsSent/s': number;\n 'framesEncoded/s': number;\n};\n\nexport type RTCInboundStats = {\n 'kind': number;\n 'jitter': number;\n 'packetsLost': number;\n 'packetsReceived': number;\n 'bytesReceived': number;\n 'framesReceived': number;\n 'frameWidth': number;\n 'frameHeight': number;\n 'framesPerSecond': number;\n 'framesDropped': number;\n 'packetsLost/s': number;\n 'packetsReceived/s': number;\n 'bytesReceived/s': number;\n 'framesReceived/s': number;\n 'framesDropped/s': number;\n};\n\nexport type RTCTrackStats = RTCOutboundStats | RTCInboundStats;\n\nexport type RTCStats = { [key: string]: RTCTrackStats };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRTCStatistics.d.ts","sourceRoot":"","sources":["../../../src/debug/stats/useRTCStatistics.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqC,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG3E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM;;EAuFvD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { takeRight } from 'lodash';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import RNFishjamClientModule from '
|
|
3
|
+
import RNFishjamClientModule from '../../RNFishjamClientModule';
|
|
4
4
|
/**
|
|
5
5
|
* This hook provides access to current rtc statistics data.
|
|
6
6
|
* @category Debugging
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRTCStatistics.js","sourceRoot":"","sources":["../../../src/debug/stats/useRTCStatistics.ts"],"names":[],"mappings":"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","sourcesContent":["import { takeRight } from 'lodash';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport type { RTCInboundStats, RTCOutboundStats, RTCStats } from './types';\nimport RNFishjamClientModule from '../../RNFishjamClientModule';\n\n/**\n * This hook provides access to current rtc statistics data.\n * @category Debugging\n */\nexport function useRTCStatistics(refreshInterval: number) {\n const MAX_SIZE = 120;\n const [statistics, setStatistics] = useState<RTCStats[]>([]);\n\n // Calculates diff between pervious and current stats,\n // providing end users with a per second metric.\n const processIncomingStats = useCallback(\n (statistics: ReadonlyArray<RTCStats>, stats: Readonly<RTCStats>) => {\n Object.keys(stats).forEach((obj) => {\n if (obj.includes('Inbound')) {\n const rtcStats = stats[obj] as RTCInboundStats;\n\n if (\n statistics.length > 0 &&\n Object.keys(statistics[statistics.length - 1]).includes(obj)\n ) {\n const prevRtcStats = statistics[statistics.length - 1][\n obj\n ] as RTCInboundStats;\n\n rtcStats['packetsLost/s'] =\n rtcStats['packetsLost'] - prevRtcStats['packetsLost'];\n rtcStats['packetsReceived/s'] =\n rtcStats['packetsReceived'] - prevRtcStats['packetsReceived'];\n rtcStats['bytesReceived/s'] =\n rtcStats['bytesReceived'] - prevRtcStats['bytesReceived'];\n rtcStats['framesReceived/s'] =\n rtcStats['framesReceived'] - prevRtcStats['framesReceived'];\n rtcStats['framesDropped/s'] =\n rtcStats['framesDropped'] - prevRtcStats['framesDropped'];\n } else {\n rtcStats['packetsLost/s'] = 0;\n rtcStats['packetsReceived/s'] = 0;\n rtcStats['bytesReceived/s'] = 0;\n rtcStats['framesReceived/s'] = 0;\n rtcStats['framesDropped/s'] = 0;\n }\n return stats;\n }\n // Outbound\n const rtcStats = stats[obj] as RTCOutboundStats;\n\n if (\n statistics.length > 0 &&\n Object.keys(statistics[statistics.length - 1]).includes(obj)\n ) {\n const prevRtcStats = statistics[statistics.length - 1][\n obj\n ] as RTCOutboundStats;\n\n rtcStats['bytesSent/s'] =\n rtcStats['bytesSent'] - prevRtcStats['bytesSent'];\n rtcStats['packetsSent/s'] =\n rtcStats['packetsSent'] - prevRtcStats['packetsSent'];\n rtcStats['framesEncoded/s'] =\n rtcStats['framesEncoded'] - prevRtcStats['framesEncoded'];\n } else {\n rtcStats['bytesSent/s'] = 0;\n rtcStats['packetsSent/s'] = 0;\n rtcStats['framesEncoded/s'] = 0;\n }\n return stats;\n });\n return stats;\n },\n [],\n );\n\n // Gets stats from the native libraries.\n const getStatistics = useCallback(async () => {\n const stats = await RNFishjamClientModule.getStatistics();\n setStatistics((prev) => {\n const newStats = [...prev, processIncomingStats(prev, stats)];\n takeRight(newStats, MAX_SIZE);\n return newStats;\n });\n }, [processIncomingStats]);\n\n useEffect(() => {\n const intervalId = setInterval(getStatistics, refreshInterval);\n return () => {\n clearInterval(intervalId);\n setStatistics([]);\n };\n }, [getStatistics, refreshInterval]);\n\n return { statistics };\n}\n"]}
|
|
@@ -11,6 +11,7 @@ export declare const ReceivableEvents: {
|
|
|
11
11
|
readonly ReconnectionStarted: "ReconnectionStarted";
|
|
12
12
|
readonly Reconnected: "Reconnected";
|
|
13
13
|
readonly Warning: "Warning";
|
|
14
|
+
readonly PeerStatusChanged: "PeerStatusChanged";
|
|
14
15
|
};
|
|
15
16
|
export declare function useFishjamEvent<T>(eventName: keyof typeof ReceivableEvents, callback: (event: T) => void): void;
|
|
16
17
|
//# sourceMappingURL=useFishjamEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFishjamEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useFishjamEvent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"useFishjamEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useFishjamEvent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;CAcnB,CAAC;AAEX,wBAAgB,eAAe,CAAC,CAAC,EAC/B,SAAS,EAAE,MAAM,OAAO,gBAAgB,EACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,QAU7B"}
|
|
@@ -13,6 +13,7 @@ export const ReceivableEvents = {
|
|
|
13
13
|
ReconnectionStarted: 'ReconnectionStarted',
|
|
14
14
|
Reconnected: 'Reconnected',
|
|
15
15
|
Warning: 'Warning',
|
|
16
|
+
PeerStatusChanged: 'PeerStatusChanged',
|
|
16
17
|
};
|
|
17
18
|
export function useFishjamEvent(eventName, callback) {
|
|
18
19
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFishjamEvent.js","sourceRoot":"","sources":["../../src/hooks/useFishjamEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,qBAAqB,EAAE,uBAAuB;IAC9C,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,mBAAmB,EAAE,qBAAqB;IAC1C,+BAA+B,EAAE,iCAAiC;IAClE,mBAAmB,EAAE,qBAAqB;IAC1C,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"useFishjamEvent.js","sourceRoot":"","sources":["../../src/hooks/useFishjamEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,qBAAqB,EAAE,uBAAuB;IAC9C,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,mBAAmB,EAAE,qBAAqB;IAC1C,+BAA+B,EAAE,iCAAiC;IAClE,mBAAmB,EAAE,qBAAqB;IAC1C,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX,MAAM,UAAU,eAAe,CAC7B,SAAwC,EACxC,QAA4B;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAG,wBAAwB,CAAC,WAAW,CAExD,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["import { useEffect } from 'react';\nimport { nativeModuleEventEmitter } from '../RNFishjamClientModule';\n\nexport const ReceivableEvents = {\n IsCameraOn: 'IsCameraOn',\n IsMicrophoneOn: 'IsMicrophoneOn',\n IsScreenShareOn: 'IsScreenShareOn',\n SimulcastConfigUpdate: 'SimulcastConfigUpdate',\n PeersUpdate: 'PeersUpdate',\n AudioDeviceUpdate: 'AudioDeviceUpdate',\n SendMediaEvent: 'SendMediaEvent',\n BandwidthEstimation: 'BandwidthEstimation',\n ReconnectionRetriesLimitReached: 'ReconnectionRetriesLimitReached',\n ReconnectionStarted: 'ReconnectionStarted',\n Reconnected: 'Reconnected',\n Warning: 'Warning',\n PeerStatusChanged: 'PeerStatusChanged',\n} as const;\n\nexport function useFishjamEvent<T>(\n eventName: keyof typeof ReceivableEvents,\n callback: (event: T) => void,\n) {\n useEffect(() => {\n const eventListener = nativeModuleEventEmitter.addListener<\n Record<keyof typeof ReceivableEvents, T>\n >(eventName, (event) => {\n callback(event[eventName]);\n });\n return () => eventListener.remove();\n }, [callback, eventName]);\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the possible statuses of a peer connection to a room (websocket state).
|
|
3
|
+
*
|
|
4
|
+
* idle - Peer is not connected, either never connected or successfully disconnected.
|
|
5
|
+
* connecting - Peer is in the process of connecting.
|
|
6
|
+
* connected - Peer has successfully connected.
|
|
7
|
+
* error - There was an error in the connection process.
|
|
8
|
+
*/
|
|
9
|
+
export type PeerStatus = 'connecting' | 'connected' | 'error' | 'idle';
|
|
10
|
+
/**
|
|
11
|
+
* This hook provides live updates of current connection state of the local peer to a room (websocket state)
|
|
12
|
+
* @returns Current peer status.
|
|
13
|
+
* @category Connection
|
|
14
|
+
* @group Hooks
|
|
15
|
+
*/
|
|
16
|
+
export declare const usePeerStatus: () => {
|
|
17
|
+
peerStatus: "connecting" | "connected" | "error" | "idle";
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=usePeerStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePeerStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/usePeerStatus.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;CAYzB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';
|
|
3
|
+
import RNFishjamClientModule from '../RNFishjamClientModule';
|
|
4
|
+
/**
|
|
5
|
+
* This hook provides live updates of current connection state of the local peer to a room (websocket state)
|
|
6
|
+
* @returns Current peer status.
|
|
7
|
+
* @category Connection
|
|
8
|
+
* @group Hooks
|
|
9
|
+
*/
|
|
10
|
+
export const usePeerStatus = () => {
|
|
11
|
+
const [peerStatus, setPeerStatus] = useState(RNFishjamClientModule.peerStatus);
|
|
12
|
+
const onPeerStatusChanged = useCallback((status) => {
|
|
13
|
+
status && setPeerStatus(status);
|
|
14
|
+
}, []);
|
|
15
|
+
useFishjamEvent(ReceivableEvents.PeerStatusChanged, onPeerStatusChanged);
|
|
16
|
+
return { peerStatus };
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=usePeerStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePeerStatus.js","sourceRoot":"","sources":["../../src/hooks/usePeerStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAY7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAC1C,qBAAqB,CAAC,UAAU,CACjC,CAAC;IAEF,MAAM,mBAAmB,GAAG,WAAW,CAAC,CAAC,MAAmB,EAAE,EAAE;QAC9D,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,eAAe,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAEzE,OAAO,EAAE,UAAU,EAAE,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import { useCallback, useState } from 'react';\nimport { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\n\n/**\n * Represents the possible statuses of a peer connection to a room (websocket state).\n *\n * idle - Peer is not connected, either never connected or successfully disconnected.\n * connecting - Peer is in the process of connecting.\n * connected - Peer has successfully connected.\n * error - There was an error in the connection process.\n */\nexport type PeerStatus = 'connecting' | 'connected' | 'error' | 'idle';\n\n/**\n * This hook provides live updates of current connection state of the local peer to a room (websocket state)\n * @returns Current peer status.\n * @category Connection\n * @group Hooks\n */\nexport const usePeerStatus = () => {\n const [peerStatus, setPeerStatus] = useState(\n RNFishjamClientModule.peerStatus,\n );\n\n const onPeerStatusChanged = useCallback((status?: PeerStatus) => {\n status && setPeerStatus(status);\n }, []);\n\n useFishjamEvent(ReceivableEvents.PeerStatusChanged, onPeerStatusChanged);\n\n return { peerStatus };\n};\n"]}
|
|
@@ -30,32 +30,32 @@ export type Track = VideoTrack | AudioTrack;
|
|
|
30
30
|
* - low_bandwidth - there is no longer enough bandwidth to maintain previously selected encoding
|
|
31
31
|
*/
|
|
32
32
|
export type EncodingReason = 'other' | 'encoding_inactive' | 'low_bandwidth';
|
|
33
|
-
export type
|
|
33
|
+
export type Peer<PeerMetadata extends GenericMetadata = GenericMetadata> = {
|
|
34
34
|
/**
|
|
35
|
-
* id used to identify a
|
|
35
|
+
* id used to identify a peer
|
|
36
36
|
*/
|
|
37
37
|
id: string;
|
|
38
38
|
/**
|
|
39
|
-
* whether the
|
|
39
|
+
* whether the peer is local or remote
|
|
40
40
|
*/
|
|
41
41
|
isLocal: boolean;
|
|
42
42
|
/**
|
|
43
|
-
* a map indexed by strings, containing
|
|
43
|
+
* a map indexed by strings, containing peer metadata from the server
|
|
44
44
|
*/
|
|
45
|
-
metadata:
|
|
45
|
+
metadata: PeerMetadata;
|
|
46
46
|
/**
|
|
47
|
-
* a list of
|
|
47
|
+
* a list of peer's video and audio tracks
|
|
48
48
|
*/
|
|
49
49
|
tracks: Track[];
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
|
-
* This hook provides live updates of room
|
|
53
|
-
* @returns An array of room
|
|
52
|
+
* This hook provides live updates of room peers.
|
|
53
|
+
* @returns An array of room peers.
|
|
54
54
|
* @category Connection
|
|
55
55
|
* @group Hooks
|
|
56
56
|
*/
|
|
57
|
-
export declare function
|
|
58
|
-
|
|
57
|
+
export declare function usePeers<PeerMetadata extends GenericMetadata = GenericMetadata>(): {
|
|
58
|
+
peers: Peer<PeerMetadata>[];
|
|
59
59
|
};
|
|
60
60
|
export {};
|
|
61
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=usePeers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePeers.d.ts","sourceRoot":"","sources":["../../src/hooks/usePeers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAiB,MAAM,UAAU,CAAC;AAIzE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7C,KAAK,SAAS,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IAEd,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAE/B,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;AAC5C;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,mBAAmB,GAAG,eAAe,CAAC;AAE7E,MAAM,MAAM,IAAI,CAAC,YAAY,SAAS,eAAe,GAAG,eAAe,IAAI;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAcF;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,YAAY,SAAS,eAAe,GAAG,eAAe;;EAoBvD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import RNFishjamClientModule from '../RNFishjamClientModule';
|
|
3
|
+
import { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';
|
|
4
|
+
function addIsActiveToTracks(peers) {
|
|
5
|
+
return peers.map((peer) => ({
|
|
6
|
+
...peer,
|
|
7
|
+
tracks: peer.tracks.map((track) => ({
|
|
8
|
+
...track,
|
|
9
|
+
isActive: track?.metadata?.active ?? true,
|
|
10
|
+
})),
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This hook provides live updates of room peers.
|
|
15
|
+
* @returns An array of room peers.
|
|
16
|
+
* @category Connection
|
|
17
|
+
* @group Hooks
|
|
18
|
+
*/
|
|
19
|
+
export function usePeers() {
|
|
20
|
+
const [peers, setPeers] = useState([]);
|
|
21
|
+
const updateActivePeers = useCallback((peers) => {
|
|
22
|
+
setPeers(addIsActiveToTracks(peers));
|
|
23
|
+
}, []);
|
|
24
|
+
useFishjamEvent(ReceivableEvents.PeersUpdate, updateActivePeers);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
async function updatePeers() {
|
|
27
|
+
const peers = await RNFishjamClientModule.getPeers();
|
|
28
|
+
setPeers(addIsActiveToTracks(peers));
|
|
29
|
+
}
|
|
30
|
+
updatePeers();
|
|
31
|
+
}, []);
|
|
32
|
+
return { peers };
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=usePeers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePeers.js","sourceRoot":"","sources":["../../src/hooks/usePeers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA4DtE,SAAS,mBAAmB,CAE1B,KAAwC;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,GAAG,IAAI;QACP,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAClC,GAAG,KAAK;YACR,QAAQ,EACL,KAAsC,EAAE,QAAQ,EAAE,MAAM,IAAI,IAAI;SACpE,CAAC,CAAC;KACJ,CAAC,CAAC,CAAC;AACN,CAAC;AACD;;;;;GAKG;AACH,MAAM,UAAU,QAAQ;IAGtB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAuB,EAAE,CAAC,CAAC;IAE7D,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,KAA2B,EAAE,EAAE;QACpE,QAAQ,CAAC,mBAAmB,CAAe,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,eAAe,CAAC,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAEjE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,UAAU,WAAW;YACxB,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,QAAQ,EAAgB,CAAC;YACnE,QAAQ,CAAC,mBAAmB,CAAe,KAAK,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,WAAW,EAAE,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC","sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { GenericMetadata, TrackEncoding, TrackMetadata } from '../types';\nimport RNFishjamClientModule from '../RNFishjamClientModule';\nimport { ReceivableEvents, useFishjamEvent } from './useFishjamEvent';\n\nexport type TrackType = 'Audio' | 'Video';\n\n/**\n * Type describing Voice Activity Detection statuses.\n *\n * speech - voice activity has been detected\n * silence - lack of voice activity has been detected\n */\nexport type VadStatus = 'silence' | 'speech';\n\ntype TrackBase = {\n id: string;\n type: TrackType;\n isActive: boolean;\n};\n\nexport type AudioTrack = TrackBase & {\n type: 'Audio';\n vadStatus: VadStatus | undefined;\n};\n\nexport type VideoTrack = TrackBase & {\n type: 'Video';\n // Encoding that is currently received. Only present for remote tracks.\n encoding: TrackEncoding | null;\n // The reason of currently selected encoding. Only present for remote tracks.\n encodingReason: EncodingReason | null;\n};\n\nexport type Track = VideoTrack | AudioTrack;\n/**\n * Type describing possible reasons of currently selected encoding.\n *\n * - other - the exact reason couldn't be determined\n * - encoding_inactive - previously selected encoding became inactive\n * - low_bandwidth - there is no longer enough bandwidth to maintain previously selected encoding\n */\nexport type EncodingReason = 'other' | 'encoding_inactive' | 'low_bandwidth';\n\nexport type Peer<PeerMetadata extends GenericMetadata = GenericMetadata> = {\n /**\n * id used to identify a peer\n */\n id: string;\n /**\n * whether the peer is local or remote\n */\n isLocal: boolean;\n /**\n * a map indexed by strings, containing peer metadata from the server\n */\n metadata: PeerMetadata;\n /**\n * a list of peer's video and audio tracks\n */\n tracks: Track[];\n};\n\nfunction addIsActiveToTracks<\n PeerMetadata extends GenericMetadata = GenericMetadata,\n>(peers: ReadonlyArray<Peer<PeerMetadata>>): Peer<PeerMetadata>[] {\n return peers.map((peer) => ({\n ...peer,\n tracks: peer.tracks.map((track) => ({\n ...track,\n isActive:\n (track as { metadata?: TrackMetadata })?.metadata?.active ?? true,\n })),\n }));\n}\n/**\n * This hook provides live updates of room peers.\n * @returns An array of room peers.\n * @category Connection\n * @group Hooks\n */\nexport function usePeers<\n PeerMetadata extends GenericMetadata = GenericMetadata,\n>() {\n const [peers, setPeers] = useState<Peer<PeerMetadata>[]>([]);\n\n const updateActivePeers = useCallback((peers: Peer<PeerMetadata>[]) => {\n setPeers(addIsActiveToTracks<PeerMetadata>(peers));\n }, []);\n\n useFishjamEvent(ReceivableEvents.PeersUpdate, updateActivePeers);\n\n useEffect(() => {\n async function updatePeers() {\n const peers = await RNFishjamClientModule.getPeers<PeerMetadata>();\n setPeers(addIsActiveToTracks<PeerMetadata>(peers));\n }\n\n updatePeers();\n }, []);\n\n return { peers };\n}\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { Peer, Track, TrackType, VadStatus, EncodingReason, } from './hooks/usePeers';
|
|
2
|
+
export { usePeers } from './hooks/usePeers';
|
|
3
3
|
export type { AudioOutputDevice, AudioOutputDeviceType, AudioSessionMode, } from './hooks/useAudioSettings';
|
|
4
4
|
export { useAudioSettings } from './hooks/useAudioSettings';
|
|
5
5
|
export { useBandwidthEstimation } from './hooks/useBandwidthEstimation';
|
|
6
6
|
export type { CameraId, Camera, CameraConfig, VideoQuality, CameraFacingDirection, } from './hooks/useCamera';
|
|
7
7
|
export { useCamera } from './hooks/useCamera';
|
|
8
8
|
export { useMicrophone } from './hooks/useMicrophone';
|
|
9
|
-
export { useRTCStatistics } from './stats/useRTCStatistics';
|
|
10
9
|
export type { ScreenShareOptions, ScreenShareQuality, } from './hooks/useScreenShare';
|
|
11
10
|
export { useScreenShare } from './hooks/useScreenShare';
|
|
12
11
|
export type { ReconnectionStatus } from './hooks/useReconnection';
|
|
13
12
|
export { useReconnection } from './hooks/useReconnection';
|
|
14
13
|
export { updatePeerMetadata } from './common/metadata';
|
|
15
|
-
export
|
|
16
|
-
export { changeWebRTCLoggingSeverity, setTargetTrackEncoding, } from './common/webRTC';
|
|
14
|
+
export { setTargetTrackEncoding } from './common/webRTC';
|
|
17
15
|
export type { ConnectionConfig } from './common/client';
|
|
18
16
|
export { joinRoom, leaveRoom } from './common/client';
|
|
19
17
|
export type { VideoPreviewViewProps } from './components/VideoPreviewView';
|
|
@@ -22,5 +20,7 @@ export type { VideoRendererProps } from './components/VideoRendererView';
|
|
|
22
20
|
export { VideoRendererView } from './components/VideoRendererView';
|
|
23
21
|
export { AndroidForegroundServiceType } from './types';
|
|
24
22
|
export { startForegroundService, stopForegroundService, } from './utils/foregroundService';
|
|
23
|
+
export type { PeerStatus } from './hooks/usePeerStatus';
|
|
24
|
+
export { usePeerStatus } from './hooks/usePeerStatus';
|
|
25
25
|
export type { TrackBandwidthLimit, TrackEncoding, SimulcastBandwidthLimit, BandwidthLimit, SimulcastConfig, VideoLayout, } from './types';
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,YAAY,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,YAAY,EACV,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEtD,YAAY,EAAE,qBAAqB,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,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { initializeWarningListener } from './utils/errorListener';
|
|
2
|
-
export {
|
|
2
|
+
export { usePeers } from './hooks/usePeers';
|
|
3
3
|
export { useAudioSettings } from './hooks/useAudioSettings';
|
|
4
4
|
export { useBandwidthEstimation } from './hooks/useBandwidthEstimation';
|
|
5
5
|
export { useCamera } from './hooks/useCamera';
|
|
6
6
|
export { useMicrophone } from './hooks/useMicrophone';
|
|
7
|
-
export { useRTCStatistics } from './stats/useRTCStatistics';
|
|
8
7
|
export { useScreenShare } from './hooks/useScreenShare';
|
|
9
8
|
export { useReconnection } from './hooks/useReconnection';
|
|
10
9
|
export { updatePeerMetadata } from './common/metadata';
|
|
11
|
-
export {
|
|
10
|
+
export { setTargetTrackEncoding } from './common/webRTC';
|
|
12
11
|
export { joinRoom, leaveRoom } from './common/client';
|
|
13
12
|
export { VideoPreviewView } from './components/VideoPreviewView';
|
|
14
13
|
export { VideoRendererView } from './components/VideoRendererView';
|
|
15
14
|
export { AndroidForegroundServiceType } from './types';
|
|
16
15
|
export { startForegroundService, stopForegroundService, } from './utils/foregroundService';
|
|
16
|
+
export { usePeerStatus } from './hooks/usePeerStatus';
|
|
17
17
|
initializeWarningListener();
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AASlE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AASlE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AASxE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,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;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD,yBAAyB,EAAE,CAAC","sourcesContent":["import { initializeWarningListener } from './utils/errorListener';\n\nexport type {\n Peer,\n Track,\n TrackType,\n VadStatus,\n EncodingReason,\n} from './hooks/usePeers';\nexport { usePeers } from './hooks/usePeers';\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 CameraId,\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 type {\n ScreenShareOptions,\n ScreenShareQuality,\n} from './hooks/useScreenShare';\nexport { useScreenShare } from './hooks/useScreenShare';\n\nexport type { ReconnectionStatus } from './hooks/useReconnection';\nexport { useReconnection } from './hooks/useReconnection';\n\nexport { updatePeerMetadata } from './common/metadata';\n\nexport { setTargetTrackEncoding } from './common/webRTC';\n\nexport type { ConnectionConfig } from './common/client';\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 { PeerStatus } from './hooks/usePeerStatus';\nexport { usePeerStatus } from './hooks/usePeerStatus';\n\nexport type {\n TrackBandwidthLimit,\n TrackEncoding,\n SimulcastBandwidthLimit,\n BandwidthLimit,\n SimulcastConfig,\n VideoLayout,\n} from './types';\n\ninitializeWarningListener();\n"]}
|