react-native-whip-whep
Version:
An implementation of WHIP and WHEP protocols functionalities for React Native.
32 lines • 1.59 kB
TypeScript
import type { NativeModule } from "expo-modules-core/types";
import { CameraId } from "./ReactNativeMobileWhepClient.types";
/** Describes whether the camera is front-facing or back-facing. */
export type CameraFacingDirection = "front" | "back" | "unspecified";
/** Contains information about the camera available on the device. */
export type Camera = {
/** A unique ID of the camera. */
id: CameraId;
/** A string describing camera name. */
name: string;
/** Information about the camera being a front one or back one. */
facingDirection: CameraFacingDirection;
};
type RNMobileWhipClientViewModule = {
cameras: readonly Camera[];
};
export declare const ReceivableEvents: {
readonly WhipPeerConnectionStateChanged: "WhipPeerConnectionStateChanged";
readonly Warning: "Warning";
readonly ScreenSharingPermissionDenied: "ScreenSharingPermissionDenied";
};
export type PeerConnectionState = "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" | "unknown";
export type ReceivableEventPayloads = {
[ReceivableEvents.WhipPeerConnectionStateChanged]: PeerConnectionState;
[ReceivableEvents.Warning]: string;
[ReceivableEvents.ScreenSharingPermissionDenied]: string;
};
declare const nativeViewModule: RNMobileWhipClientViewModule & NativeModule<Record<keyof typeof ReceivableEvents, (payload: any) => void>>;
/** Gives access to the cameras available on the device.*/
export declare const cameras: readonly Camera[];
export default nativeViewModule;
//# sourceMappingURL=ReactNativeMobileWhipClientViewModule.d.ts.map