UNPKG

@webrtc2/client

Version:

WebRTC2 Client - React Native, Web & Electron WebRTC hooks and components for cross-platform real-time video calls, audio communication, and screen sharing

45 lines (42 loc) 1.1 kB
/** * @webrtc2/client * * WebRTC2 Client - React hooks and components for real-time communication * * @example * ```tsx * import { useWebRTC, WebRTCProvider } from '@webrtc2/client'; * * function App() { * return ( * <WebRTCProvider> * <VideoCall /> * </WebRTCProvider> * ); * } * * function VideoCall() { * const { connect, localStream, remoteStream } = useWebRTC(); * * return ( * <div> * <video srcObject={localStream} autoPlay muted /> * <video srcObject={remoteStream} autoPlay /> * <button onClick={() => connect('room-id')}>Connect</button> * </div> * ); * } * ``` */ export { AudioCall } from './components/AudioCall'; export { ScreenShare } from './components/ScreenShare'; export { VideoCall } from './components/VideoCall'; export { useWebRTC } from './hooks/useWebRTC'; export { WebRTCProvider } from './providers/WebRTCProvider'; export type { CallState, ConnectionState, MediaStreamOptions, PeerConnection, WebRTCConfig } from './types'; // Version export const VERSION = '1.0.0';