UNPKG

react-native-whip-whep

Version:

An implementation of WHIP and WHEP protocols functionalities for React Native.

17 lines 870 B
import { useEventState } from "./useEventState"; import ReactNativeMobileWhepClientModule, { ReceivableEvents, } from "../ReactNativeMobileWhepClientModule"; /** * Hook that returns the current state of the WHEP peer connection. * If WHEP client was not created, it will return "unknown". */ export const useWhepConnectionState = () => { return useEventState(ReceivableEvents.WhepPeerConnectionStateChanged, ReactNativeMobileWhepClientModule.whepPeerConnectionState ?? "unknown"); }; /** * Hook that returns the current state of the WHIP peer connection. * If WHIP client was not created, it will return "unknown". */ export const useWhipConnectionState = () => { return useEventState(ReceivableEvents.WhipPeerConnectionStateChanged, ReactNativeMobileWhepClientModule.whipPeerConnectionState ?? "unknown"); }; //# sourceMappingURL=useConnectionState.js.map