@fishjam-cloud/react-native-client 0.17.0 → 0.18.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/build/components/LivestreamView.d.ts +6 -0
- package/build/components/LivestreamView.d.ts.map +1 -0
- package/build/components/LivestreamView.js +3 -0
- package/build/components/LivestreamView.js.map +1 -0
- package/build/hooks/useLivestream.d.ts +6 -0
- package/build/hooks/useLivestream.d.ts.map +1 -0
- package/build/hooks/useLivestream.js +12 -0
- package/build/hooks/useLivestream.js.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type LivestreamViewProps = {
|
|
3
|
+
style?: StyleProp<ViewStyle>;
|
|
4
|
+
};
|
|
5
|
+
export declare const LivestreamView: ({ style }: LivestreamViewProps) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=LivestreamView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LivestreamView.d.ts","sourceRoot":"","sources":["../../src/components/LivestreamView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,WAAW,mBAAmB,gCAE5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LivestreamView.js","sourceRoot":"","sources":["../../src/components/LivestreamView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAMxD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAuB,EAAE,EAAE,CAAC,CAChE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,KAAsB,CAAC,EAAG,CAClD,CAAC","sourcesContent":["import { CSSProperties } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { WhepClientView } from 'react-native-whip-whep';\n\nexport type LivestreamViewProps = {\n style?: StyleProp<ViewStyle>;\n};\n\nexport const LivestreamView = ({ style }: LivestreamViewProps) => (\n <WhepClientView style={style as CSSProperties} />\n);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLivestream.d.ts","sourceRoot":"","sources":["../../src/hooks/useLivestream.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,QAAO,mBAShC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { connectWhepClient, createWhepClient, disconnectWhepClient, } from 'react-native-whip-whep';
|
|
3
|
+
export const useLivestream = () => {
|
|
4
|
+
const connect = useCallback(async (url, token) => {
|
|
5
|
+
createWhepClient(url, {
|
|
6
|
+
authToken: token,
|
|
7
|
+
});
|
|
8
|
+
await connectWhepClient();
|
|
9
|
+
}, []);
|
|
10
|
+
return { connect, disconnect: disconnectWhepClient };
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useLivestream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLivestream.js","sourceRoot":"","sources":["../../src/hooks/useLivestream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAOhC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAwB,EAAE;IACrD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;QAC/D,gBAAgB,CAAC,GAAG,EAAE;YACpB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;QACH,MAAM,iBAAiB,EAAE,CAAC;IAC5B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport {\n connectWhepClient,\n createWhepClient,\n disconnectWhepClient,\n} from 'react-native-whip-whep';\n\nexport interface UseLivestreamResult {\n connect: (url: string, token: string) => Promise<void>;\n disconnect: () => void;\n}\n\nexport const useLivestream = (): UseLivestreamResult => {\n const connect = useCallback(async (url: string, token: string) => {\n createWhepClient(url, {\n authToken: token,\n });\n await connectWhepClient();\n }, []);\n\n return { connect, disconnect: disconnectWhepClient };\n};\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -8,8 +8,10 @@ joinRoom,
|
|
|
8
8
|
leaveRoom, } from './common/client';
|
|
9
9
|
export type { VideoPreviewViewProps } from './components/VideoPreviewView';
|
|
10
10
|
export type { VideoRendererProps } from './components/VideoRendererView';
|
|
11
|
+
export type { LivestreamViewProps } from './components/LivestreamView';
|
|
11
12
|
export { VideoPreviewView } from './components/VideoPreviewView';
|
|
12
13
|
export { VideoRendererView } from './components/VideoRendererView';
|
|
14
|
+
export { LivestreamView } from './components/LivestreamView';
|
|
13
15
|
export type { Peer, PeerId, Track, TrackId, TrackType, VadStatus, EncodingReason, TrackBase, AudioTrack, VideoTrack, UsePeersResult, PeerWithTracks, PeerTrackMetadata, DistinguishedTracks, } from './hooks/usePeers';
|
|
14
16
|
export type { AudioOutputDevice, AudioOutputDeviceType, AudioSessionMode, } from './hooks/useAudioSettings';
|
|
15
17
|
export type { CameraId, Camera, CameraConfig, VideoQuality, CameraFacingDirection, CameraConfigBase, } from './hooks/useCamera';
|
|
@@ -17,6 +19,7 @@ export type { ScreenShareOptions, ScreenShareQuality, } from './hooks/useScreenS
|
|
|
17
19
|
export type { ForegroundServiceConfig } from './hooks/useForegroundService';
|
|
18
20
|
export type { JoinRoomConfig, ReconnectionStatus, PeerStatus, } from './hooks/useConnection';
|
|
19
21
|
export type { AppScreenShareData } from './hooks/useAppScreenShare';
|
|
22
|
+
export type { UseLivestreamResult } from './hooks/useLivestream';
|
|
20
23
|
export { useAudioSettings } from './hooks/useAudioSettings';
|
|
21
24
|
export { useBandwidthEstimation } from './hooks/useBandwidthEstimation';
|
|
22
25
|
export { useCamera } from './hooks/useCamera';
|
|
@@ -29,6 +32,7 @@ export { usePeers } from './hooks/usePeers';
|
|
|
29
32
|
export { useForegroundService } from './hooks/useForegroundService';
|
|
30
33
|
export { useConnection } from './hooks/useConnection';
|
|
31
34
|
export { useUpdatePeerMetadata } from './hooks/useUpdatePeerMetadata';
|
|
35
|
+
export { useLivestream } from './hooks/useLivestream';
|
|
32
36
|
export type { FishjamRoomProps } from './components/FishjamRoom';
|
|
33
37
|
export { FishjamRoom } from './components/FishjamRoom';
|
|
34
38
|
//# 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":"AAGA,YAAY,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,aAAa,EACb,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO;AACL,kBAAkB;AAClB,QAAQ;AACR,kBAAkB;AAClB,SAAS,GACV,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,qBAAqB,EAAE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,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -9,6 +9,7 @@ joinRoom,
|
|
|
9
9
|
leaveRoom, } from './common/client';
|
|
10
10
|
export { VideoPreviewView } from './components/VideoPreviewView';
|
|
11
11
|
export { VideoRendererView } from './components/VideoRendererView';
|
|
12
|
+
export { LivestreamView } from './components/LivestreamView';
|
|
12
13
|
// #endregion
|
|
13
14
|
// #region hooks
|
|
14
15
|
export { useAudioSettings } from './hooks/useAudioSettings';
|
|
@@ -23,6 +24,7 @@ export { usePeers } from './hooks/usePeers';
|
|
|
23
24
|
export { useForegroundService } from './hooks/useForegroundService';
|
|
24
25
|
export { useConnection } from './hooks/useConnection';
|
|
25
26
|
export { useUpdatePeerMetadata } from './hooks/useUpdatePeerMetadata';
|
|
27
|
+
export { useLivestream } from './hooks/useLivestream';
|
|
26
28
|
export { FishjamRoom } from './components/FishjamRoom';
|
|
27
29
|
initializeWarningListener();
|
|
28
30
|
//# 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;AAWlE,aAAa;AAEb,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO;AACL,kBAAkB;AAClB,QAAQ;AACR,kBAAkB;AAClB,SAAS,GACV,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAWlE,aAAa;AAEb,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO;AACL,kBAAkB;AAClB,QAAQ;AACR,kBAAkB;AAClB,SAAS,GACV,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAgD7D,aAAa;AAEb,gBAAgB;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,yBAAyB,EAAE,CAAC","sourcesContent":["import { initializeWarningListener } from './utils/errorListener';\n\n// #region types\nexport type {\n SimulcastConfig,\n VideoLayout,\n GenericMetadata,\n TrackMetadata,\n Brand,\n} from './types';\nexport type { ConnectionConfig } from './common/client';\n// #endregion\n\n// #region methods\nexport { updatePeerMetadata } from './common/metadata';\nexport {\n /** @deprecated */\n joinRoom,\n /** @deprecated */\n leaveRoom,\n} from './common/client';\n// #endregion\n\n// #region components\nexport type { VideoPreviewViewProps } from './components/VideoPreviewView';\nexport type { VideoRendererProps } from './components/VideoRendererView';\nexport type { LivestreamViewProps } from './components/LivestreamView';\n\nexport { VideoPreviewView } from './components/VideoPreviewView';\nexport { VideoRendererView } from './components/VideoRendererView';\nexport { LivestreamView } from './components/LivestreamView';\n// #endregion\n\n// #region types for hooks\nexport type {\n Peer,\n PeerId,\n Track,\n TrackId,\n TrackType,\n VadStatus,\n EncodingReason,\n TrackBase,\n AudioTrack,\n VideoTrack,\n UsePeersResult,\n PeerWithTracks,\n PeerTrackMetadata,\n DistinguishedTracks,\n} from './hooks/usePeers';\n\nexport type {\n AudioOutputDevice,\n AudioOutputDeviceType,\n AudioSessionMode,\n} from './hooks/useAudioSettings';\n\nexport type {\n CameraId,\n Camera,\n CameraConfig,\n VideoQuality,\n CameraFacingDirection,\n CameraConfigBase,\n} from './hooks/useCamera';\n\nexport type {\n ScreenShareOptions,\n ScreenShareQuality,\n} from './hooks/useScreenShare';\nexport type { ForegroundServiceConfig } from './hooks/useForegroundService';\nexport type {\n JoinRoomConfig,\n ReconnectionStatus,\n PeerStatus,\n} from './hooks/useConnection';\nexport type { AppScreenShareData } from './hooks/useAppScreenShare';\nexport type { UseLivestreamResult } from './hooks/useLivestream';\n// #endregion\n\n// #region hooks\nexport { useAudioSettings } from './hooks/useAudioSettings';\nexport { useBandwidthEstimation } from './hooks/useBandwidthEstimation';\nexport { useCamera } from './hooks/useCamera';\nexport { useMicrophone } from './hooks/useMicrophone';\nexport { useScreenShare } from './hooks/useScreenShare';\nexport { useAppScreenShare } from './hooks/useAppScreenShare';\nexport { useReconnection } from './hooks/useReconnection';\nexport { usePeerStatus } from './hooks/usePeerStatus';\nexport { usePeers } from './hooks/usePeers';\nexport { useForegroundService } from './hooks/useForegroundService';\nexport { useConnection } from './hooks/useConnection';\nexport { useUpdatePeerMetadata } from './hooks/useUpdatePeerMetadata';\nexport { useLivestream } from './hooks/useLivestream';\n// #endregion\n\nexport type { FishjamRoomProps } from './components/FishjamRoom';\nexport { FishjamRoom } from './components/FishjamRoom';\n\ninitializeWarningListener();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/react-native-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "A React Native client for Fishjam",
|
|
5
5
|
"author": "Fishjam Team",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"promise-fs": "^2.1.1",
|
|
44
44
|
"protobufjs": "^7.4.0",
|
|
45
|
+
"react-native-whip-whep": "0.2.1",
|
|
45
46
|
"zod": "^3.24.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|