@fishjam-cloud/react-native-client 0.25.3 → 0.26.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/overrides/RTCView.d.ts +3 -2
- package/dist/overrides/RTCView.d.ts.map +1 -1
- package/dist/overrides/RTCView.js +3 -4
- package/dist/overrides/hooks.d.ts +27 -0
- package/dist/overrides/hooks.d.ts.map +1 -0
- package/dist/overrides/hooks.js +25 -0
- package/dist/overrides/types.d.ts +42 -0
- package/dist/overrides/types.d.ts.map +1 -0
- package/dist/overrides/types.js +1 -0
- package/dist/webrtc-polyfill.js +1 -3
- package/package.json +18 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native client SDK for building mobile video and audio apps with Fishjam.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
1
6
|
import './webrtc-polyfill';
|
|
2
7
|
import React from 'react';
|
|
3
|
-
import { type FishjamProviderProps as ReactClientFishjamProviderProps
|
|
8
|
+
import { type FishjamProviderProps as ReactClientFishjamProviderProps } from '@fishjam-cloud/react-client';
|
|
4
9
|
export { RTCView, RTCPIPView, type RTCVideoViewProps, type RTCPIPViewProps } from './overrides/RTCView';
|
|
5
|
-
export { ScreenCapturePickerView, startPIP, stopPIP, useCallKit, useCallKitEvent, useCallKitService, } from '@fishjam-cloud/react-native-webrtc';
|
|
6
|
-
export type { CallKitAction, CallKitConfig, MediaStream } from '@fishjam-cloud/react-native-webrtc';
|
|
10
|
+
export { ScreenCapturePickerView, startPIP, stopPIP, AudioDeviceType, useCallKit, useCallKitEvent, useCallKitService, useAudioOutput, } from '@fishjam-cloud/react-native-webrtc';
|
|
11
|
+
export type { CallKitAction, CallKitConfig, MediaStream, AudioDevice, AudioOutputChangedInfo, UseAudioOutputResult, } from '@fishjam-cloud/react-native-webrtc';
|
|
7
12
|
export { useForegroundService, type ForegroundServiceConfig } from './useForegroundService';
|
|
8
|
-
export { useCameraPermissions, useMicrophonePermissions, type PermissionStatus
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export type {
|
|
13
|
+
export { useCameraPermissions, useMicrophonePermissions, type PermissionStatus } from './hooks/usePermissions';
|
|
14
|
+
export { InitializeDevicesSettings, useConnection, useDataChannel, useSandbox, useUpdatePeerMetadata, useVAD, Variant, } from '@fishjam-cloud/react-client';
|
|
15
|
+
export { useCamera, useInitializeDevices, useMicrophone, useScreenShare, useCustomSource, useLivestreamStreamer, useLivestreamViewer, usePeers, } from './overrides/hooks';
|
|
16
|
+
export type { StreamerInputs, ConnectStreamerConfig, UseLivestreamStreamerResult, UseLivestreamViewerResult, Track, RemoteTrack, CustomSource, InitializeDevicesResult, PeerWithTracks, TrackFields, } from './overrides/types';
|
|
17
|
+
export type { UseInitializeDevicesParams, JoinRoomConfig, ConnectViewerConfig, RoomType, UseSandboxProps, BandwidthLimits, Brand, DeviceError, DeviceItem, InitializeDevicesStatus, MiddlewareResult, PeerId, PeerStatus, PersistLastDeviceHandlers, SimulcastBandwidthLimits, StreamConfig, TrackId, TrackMiddleware, TracksMiddleware, TracksMiddlewareResult, AuthErrorReason, JoinErrorReason, UseDataChannelResult, DataCallback, DataChannelOptions, Metadata, ReconnectConfig, ReconnectionStatus, SimulcastBandwidthLimit, SimulcastConfig, TrackBandwidthLimit, } from '@fishjam-cloud/react-client';
|
|
12
18
|
export type FishjamProviderProps = Omit<ReactClientFishjamProviderProps, 'persistLastDevice' | 'fishjamClient'>;
|
|
13
19
|
export declare function FishjamProvider(props: FishjamProviderProps): React.FunctionComponentElement<ReactClientFishjamProviderProps>;
|
|
14
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,oBAAoB,IAAI,+BAA+B,EAC7D,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,eAAe,EACf,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,oCAAoC,CAAC;AAE5C,YAAY,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/G,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,UAAU,EACV,qBAAqB,EACrB,MAAM,EACN,OAAO,GACR,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,0BAA0B,EAC1B,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,eAAe,EACf,KAAK,EACL,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,+BAA+B,EAAE,mBAAmB,GAAG,eAAe,CAAC,CAAC;AAChH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,mEAO1D"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native client SDK for building mobile video and audio apps with Fishjam.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
1
6
|
/* eslint-disable simple-import-sort/imports */
|
|
2
7
|
/* eslint-disable import/no-duplicates */
|
|
3
8
|
/* eslint-disable simple-import-sort/exports */
|
|
@@ -5,14 +10,14 @@
|
|
|
5
10
|
// TODO: FCE-2464 Investigate order
|
|
6
11
|
import './webrtc-polyfill';
|
|
7
12
|
import React from 'react';
|
|
8
|
-
import { FishjamProvider as ReactClientFishjamProvider,
|
|
13
|
+
import { FishjamProvider as ReactClientFishjamProvider, } from '@fishjam-cloud/react-client';
|
|
9
14
|
import { FishjamClient } from '@fishjam-cloud/ts-client';
|
|
10
15
|
export { RTCView, RTCPIPView } from './overrides/RTCView';
|
|
11
|
-
export { ScreenCapturePickerView, startPIP, stopPIP, useCallKit, useCallKitEvent, useCallKitService, } from '@fishjam-cloud/react-native-webrtc';
|
|
16
|
+
export { ScreenCapturePickerView, startPIP, stopPIP, AudioDeviceType, useCallKit, useCallKitEvent, useCallKitService, useAudioOutput, } from '@fishjam-cloud/react-native-webrtc';
|
|
12
17
|
export { useForegroundService } from './useForegroundService';
|
|
13
|
-
export { useCameraPermissions, useMicrophonePermissions
|
|
14
|
-
export {
|
|
15
|
-
export
|
|
18
|
+
export { useCameraPermissions, useMicrophonePermissions } from './hooks/usePermissions';
|
|
19
|
+
export { useConnection, useDataChannel, useSandbox, useUpdatePeerMetadata, useVAD, Variant, } from '@fishjam-cloud/react-client';
|
|
20
|
+
export { useCamera, useInitializeDevices, useMicrophone, useScreenShare, useCustomSource, useLivestreamStreamer, useLivestreamViewer, usePeers, } from './overrides/hooks';
|
|
16
21
|
export function FishjamProvider(props) {
|
|
17
22
|
const fishjamClient = new FishjamClient({ reconnect: props.reconnect, debug: props.debug, clientType: 'mobile' });
|
|
18
23
|
return React.createElement(ReactClientFishjamProvider, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { MediaStream as RNMediaStream } from '@fishjam-cloud/react-native-webrtc';
|
|
1
2
|
import { RTCPIPView as OriginalRTCPIPView, RTCView as OriginalRTCView } from '@fishjam-cloud/react-native-webrtc';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
export type RTCVideoViewProps = Omit<React.ComponentPropsWithRef<typeof OriginalRTCView>, 'streamURL'> & {
|
|
4
|
-
mediaStream:
|
|
5
|
+
mediaStream: RNMediaStream;
|
|
5
6
|
};
|
|
6
7
|
export type RTCPIPViewProps = Omit<React.ComponentPropsWithRef<typeof OriginalRTCPIPView>, 'streamURL'> & {
|
|
7
|
-
mediaStream:
|
|
8
|
+
mediaStream: RNMediaStream;
|
|
8
9
|
};
|
|
9
10
|
export declare const RTCView: ({ ref, ...props }: RTCVideoViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export declare const RTCPIPView: ({ ref, ...props }: RTCPIPViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTCView.d.ts","sourceRoot":"","sources":["../../src/overrides/RTCView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RTCView.d.ts","sourceRoot":"","sources":["../../src/overrides/RTCView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAClH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,EAAE,WAAW,CAAC,GAAG;IACvG,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,kBAAkB,CAAC,EAAE,WAAW,CAAC,GAAG;IACxG,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AAcF,eAAO,MAAM,OAAO,GAAI,mBAAmB,iBAAiB,4CAG3D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,mBAAmB,eAAe,4CAG5D,CAAC"}
|
|
@@ -2,12 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { RTCPIPView as OriginalRTCPIPView, RTCView as OriginalRTCView } from '@fishjam-cloud/react-native-webrtc';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
const convertMediaStreamToURL = (mediaStream) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return rnMediaStream.toURL();
|
|
5
|
+
if (mediaStream && typeof mediaStream.toURL === 'function') {
|
|
6
|
+
return mediaStream.toURL();
|
|
8
7
|
}
|
|
9
8
|
else {
|
|
10
|
-
console.error('mediaStream.toURL is not a function. Make sure to use the MediaStream type from @fishjam-cloud/react-native-webrtc',
|
|
9
|
+
console.error('mediaStream.toURL is not a function. Make sure to use the MediaStream type from @fishjam-cloud/react-native-webrtc', mediaStream);
|
|
11
10
|
return undefined;
|
|
12
11
|
}
|
|
13
12
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useCamera as useCameraReactClient, useCustomSource as useCustomSourceReactClient, useInitializeDevices as useInitializeDevicesReactClient, useMicrophone as useMicrophoneReactClient, useScreenShare as useScreenShareReactClient } from '@fishjam-cloud/react-client';
|
|
2
|
+
import type { MediaStream as RNMediaStream } from '@fishjam-cloud/react-native-webrtc';
|
|
3
|
+
import type { InitializeDevicesResult, PeerWithTracks, RemoteTrack, UseLivestreamStreamerResult, UseLivestreamViewerResult } from './types';
|
|
4
|
+
export declare const useCamera: () => Omit<ReturnType<typeof useCameraReactClient>, "cameraStream"> & {
|
|
5
|
+
cameraStream: RNMediaStream | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const useMicrophone: () => Omit<ReturnType<typeof useMicrophoneReactClient>, "toggleMicrophoneMute" | "microphoneStream"> & {
|
|
8
|
+
microphoneStream: RNMediaStream | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const useScreenShare: () => Omit<ReturnType<typeof useScreenShareReactClient>, "stream"> & {
|
|
11
|
+
stream: RNMediaStream | null;
|
|
12
|
+
};
|
|
13
|
+
export declare const useCustomSource: <T extends string>(sourceId: T) => Omit<ReturnType<typeof useCustomSourceReactClient>, "stream" | "setStream"> & {
|
|
14
|
+
stream: RNMediaStream | undefined;
|
|
15
|
+
setStream: (newStream: RNMediaStream | null) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function useLivestreamStreamer(): UseLivestreamStreamerResult;
|
|
18
|
+
export declare function useLivestreamViewer(): UseLivestreamViewerResult;
|
|
19
|
+
export declare const useInitializeDevices: () => {
|
|
20
|
+
initializeDevices: (...args: Parameters<ReturnType<typeof useInitializeDevicesReactClient>["initializeDevices"]>) => Promise<InitializeDevicesResult>;
|
|
21
|
+
};
|
|
22
|
+
export declare function usePeers<P = Record<string, unknown>, S = Record<string, unknown>>(): {
|
|
23
|
+
localPeer: PeerWithTracks<P, S> | null;
|
|
24
|
+
remotePeers: PeerWithTracks<P, S, RemoteTrack>[];
|
|
25
|
+
peers: PeerWithTracks<P, S, RemoteTrack>[];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/overrides/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,oBAAoB,EACjC,eAAe,IAAI,0BAA0B,EAC7C,oBAAoB,IAAI,+BAA+B,EAGvD,aAAa,IAAI,wBAAwB,EAEzC,cAAc,IAAI,yBAAyB,EAC5C,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGvF,OAAO,KAAK,EAEV,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,SAAS,EAA2B,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,cAAc,CAAC,GAAG;IACrH,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,aAAa,EAA+B,MAAM,IAAI,CACjE,UAAU,CAAC,OAAO,wBAAwB,CAAC,EAC3C,sBAAsB,GAAG,kBAAkB,CAC5C,GAAG;IACF,gBAAgB,EAAE,aAAa,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAgC,MAAM,IAAI,CACnE,UAAU,CAAC,OAAO,yBAAyB,CAAC,EAC5C,QAAQ,CACT,GAAG;IACF,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAiC,CAAC,CAAC,SAAS,MAAM,EAC5E,QAAQ,EAAE,CAAC,KACR,IAAI,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG;IACjF,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,SAAS,EAAE,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,2BAA2B,CAYnE;AAED,wBAAgB,mBAAmB,IAAI,yBAAyB,CAM/D;AAED,eAAO,MAAM,oBAAoB,EAAsC,MAAM;IAC3E,iBAAiB,EAAE,CACjB,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,mBAAmB,CAAC,CAAC,KACzF,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B;IAC/C,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IACvC,WAAW,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;IACjD,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;CAC5C,CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useCamera as useCameraReactClient, useCustomSource as useCustomSourceReactClient, useInitializeDevices as useInitializeDevicesReactClient, useLivestreamStreamer as useLivestreamStreamerReactClient, useLivestreamViewer as useLivestreamViewerReactClient, useMicrophone as useMicrophoneReactClient, usePeers as usePeersReactClient, useScreenShare as useScreenShareReactClient, } from '@fishjam-cloud/react-client';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
export const useCamera = useCameraReactClient;
|
|
4
|
+
export const useMicrophone = useMicrophoneReactClient;
|
|
5
|
+
export const useScreenShare = useScreenShareReactClient;
|
|
6
|
+
export const useCustomSource = useCustomSourceReactClient;
|
|
7
|
+
export function useLivestreamStreamer() {
|
|
8
|
+
const { connect: reactConnect, ...rest } = useLivestreamStreamerReactClient();
|
|
9
|
+
const connect = useCallback(async (config, urlOverride) => {
|
|
10
|
+
// @ts-expect-error RNMediaStream is MediaStream at runtime via webrtc polyfill
|
|
11
|
+
await reactConnect(config, urlOverride);
|
|
12
|
+
}, [reactConnect]);
|
|
13
|
+
return { ...rest, connect };
|
|
14
|
+
}
|
|
15
|
+
export function useLivestreamViewer() {
|
|
16
|
+
const { stream, ...rest } = useLivestreamViewerReactClient();
|
|
17
|
+
return {
|
|
18
|
+
...rest,
|
|
19
|
+
stream: stream,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export const useInitializeDevices = useInitializeDevicesReactClient;
|
|
23
|
+
export function usePeers() {
|
|
24
|
+
return usePeersReactClient();
|
|
25
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CustomSource as ReactClientCustomSource, InitializeDevicesResult as ReactClientInitializeDevicesResult, PeerWithTracks as ReactClientPeerWithTracks, RemoteTrack as ReactClientRemoteTrack, Track as ReactClientTrack, UseLivestreamStreamerResult as ReactClientUseLivestreamStreamerResult, UseLivestreamViewerResult as ReactClientUseLivestreamViewerResult } from '@fishjam-cloud/react-client';
|
|
2
|
+
import type { MediaStream as RNMediaStream } from '@fishjam-cloud/react-native-webrtc';
|
|
3
|
+
export type StreamerInputs = {
|
|
4
|
+
video: RNMediaStream;
|
|
5
|
+
audio?: RNMediaStream | null;
|
|
6
|
+
} | {
|
|
7
|
+
video?: null;
|
|
8
|
+
audio: RNMediaStream;
|
|
9
|
+
};
|
|
10
|
+
export type ConnectStreamerConfig = {
|
|
11
|
+
inputs: StreamerInputs;
|
|
12
|
+
token: string;
|
|
13
|
+
};
|
|
14
|
+
export type UseLivestreamStreamerResult = Omit<ReactClientUseLivestreamStreamerResult, 'connect'> & {
|
|
15
|
+
connect: (config: ConnectStreamerConfig, urlOverride?: string) => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export type UseLivestreamViewerResult = Omit<ReactClientUseLivestreamViewerResult, 'stream'> & {
|
|
18
|
+
stream: RNMediaStream | null;
|
|
19
|
+
};
|
|
20
|
+
export type Track = Omit<ReactClientTrack, 'stream'> & {
|
|
21
|
+
stream: RNMediaStream | null;
|
|
22
|
+
};
|
|
23
|
+
export type RemoteTrack = Omit<ReactClientRemoteTrack, 'stream'> & {
|
|
24
|
+
stream: RNMediaStream | null;
|
|
25
|
+
};
|
|
26
|
+
export type CustomSource<T extends string> = Omit<ReactClientCustomSource<T>, 'stream'> & {
|
|
27
|
+
stream?: RNMediaStream;
|
|
28
|
+
};
|
|
29
|
+
export type InitializeDevicesResult = Omit<ReactClientInitializeDevicesResult, 'stream'> & {
|
|
30
|
+
stream: RNMediaStream | null;
|
|
31
|
+
};
|
|
32
|
+
export type TrackFields = 'tracks' | 'cameraTrack' | 'microphoneTrack' | 'screenShareVideoTrack' | 'screenShareAudioTrack' | 'customVideoTracks' | 'customAudioTracks';
|
|
33
|
+
export type PeerWithTracks<P, S, T extends Track = Track> = Omit<ReactClientPeerWithTracks<P, S>, TrackFields> & {
|
|
34
|
+
tracks: T[];
|
|
35
|
+
cameraTrack?: T;
|
|
36
|
+
microphoneTrack?: T;
|
|
37
|
+
screenShareVideoTrack?: T;
|
|
38
|
+
screenShareAudioTrack?: T;
|
|
39
|
+
customVideoTracks: T[];
|
|
40
|
+
customAudioTracks: T[];
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/overrides/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,uBAAuB,EACvC,uBAAuB,IAAI,kCAAkC,EAC7D,cAAc,IAAI,yBAAyB,EAC3C,WAAW,IAAI,sBAAsB,EACrC,KAAK,IAAI,gBAAgB,EACzB,2BAA2B,IAAI,sCAAsC,EACrE,yBAAyB,IAAI,oCAAoC,EAClE,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEvF,MAAM,MAAM,cAAc,GACtB;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GACtD;IAAE,KAAK,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,sCAAsC,EAAE,SAAS,CAAC,GAAG;IAClG,OAAO,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,oCAAoC,EAAE,QAAQ,CAAC,GAAG;IAC7F,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAEpG,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC;AAErH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,kCAAkC,EAAE,QAAQ,CAAC,GAAG;IACzF,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,KAAK,GAAG,KAAK,IAAI,IAAI,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG;IAC/G,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB,eAAe,CAAC,EAAE,CAAC,CAAC;IACpB,qBAAqB,CAAC,EAAE,CAAC,CAAC;IAC1B,qBAAqB,CAAC,EAAE,CAAC,CAAC;IAC1B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,iBAAiB,EAAE,CAAC,EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/webrtc-polyfill.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import 'fast-text-encoding';
|
|
2
2
|
import 'react-native-get-random-values';
|
|
3
3
|
import 'react-native-url-polyfill/auto';
|
|
4
|
-
import { registerGlobals } from '@fishjam-cloud/react-native-webrtc';
|
|
5
|
-
// @ts-ignore - event-target-shim types not properly exported via package.json exports
|
|
6
|
-
import { EventTarget } from 'event-target-shim';
|
|
4
|
+
import { EventTarget, registerGlobals } from '@fishjam-cloud/react-native-webrtc';
|
|
7
5
|
import { patchGetUserMediaWithPermissionWarnings } from './overrides/getUserMedia';
|
|
8
6
|
import { RTCPeerConnection } from './overrides/RTCPeerConnection';
|
|
9
7
|
import { LocalStoragePolyfill } from './polyfills/local-storage';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/react-native-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0-rc.1",
|
|
4
4
|
"description": "React Native client library for Fishjam",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Fishjam Team",
|
|
@@ -25,28 +25,40 @@
|
|
|
25
25
|
"fishjam"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
|
+
"tsc": "tsc",
|
|
28
29
|
"build": "tsc && EXPO_NONINTERACTIVE=1 expo-module build plugin",
|
|
29
30
|
"lint": "eslint . --ext .ts,.tsx --fix",
|
|
30
|
-
"prepare": "tsc && EXPO_NONINTERACTIVE=1 expo-module build plugin"
|
|
31
|
+
"prepare": "tsc && EXPO_NONINTERACTIVE=1 expo-module build plugin",
|
|
32
|
+
"format": "prettier --write . --ignore-path ./.eslintignore"
|
|
33
|
+
},
|
|
34
|
+
"lint-staged": {
|
|
35
|
+
"*": [
|
|
36
|
+
"yarn format"
|
|
37
|
+
],
|
|
38
|
+
"*.{js,ts,tsx}": [
|
|
39
|
+
"yarn lint"
|
|
40
|
+
]
|
|
31
41
|
},
|
|
32
42
|
"peerDependencies": {
|
|
33
|
-
"@fishjam-cloud/react-native-webrtc": "0.25.
|
|
43
|
+
"@fishjam-cloud/react-native-webrtc": "0.25.8",
|
|
34
44
|
"expo": "*",
|
|
35
45
|
"react": "*",
|
|
36
46
|
"react-native": "*",
|
|
37
47
|
"react-native-get-random-values": "1.11.0"
|
|
38
48
|
},
|
|
39
49
|
"dependencies": {
|
|
40
|
-
"@fishjam-cloud/react-client": "0.
|
|
41
|
-
"@fishjam-cloud/react-native-webrtc": "0.25.
|
|
50
|
+
"@fishjam-cloud/react-client": "0.26.0-rc.1",
|
|
51
|
+
"@fishjam-cloud/react-native-webrtc": "0.25.8",
|
|
42
52
|
"fast-text-encoding": "1.0.6",
|
|
43
53
|
"react-native-get-random-values": "1.11.0",
|
|
44
54
|
"react-native-url-polyfill": "3.0.0"
|
|
45
55
|
},
|
|
46
56
|
"devDependencies": {
|
|
47
57
|
"eslint-config-expo": "~9.2.0",
|
|
58
|
+
"eslint-import-resolver-typescript": "^3.10.1",
|
|
48
59
|
"eslint-plugin-prettier": "^5.5.1",
|
|
49
|
-
"expo-module-scripts": "^
|
|
60
|
+
"expo-module-scripts": "^55.0.2",
|
|
61
|
+
"typescript": "^5.8.3"
|
|
50
62
|
},
|
|
51
63
|
"packageManager": "yarn@4.12.0"
|
|
52
64
|
}
|