Hook to access and manage video state
This hook provides video state management including:
Object containing video state and control functions
Set video capture state explicitly
Toggle video capture on/off
const { isVideoOn, toggleVideo, setVideo } = useVideoState();return ( <div> <button onClick={() => toggleVideo({ fps: 30 })}> {isVideoOn ? 'Turn Off Video' : 'Turn On Video'} </button> <button onClick={() => setVideo(true, { fps: 15 })}> Force Video On </button> </div>); Copy
const { isVideoOn, toggleVideo, setVideo } = useVideoState();return ( <div> <button onClick={() => toggleVideo({ fps: 30 })}> {isVideoOn ? 'Turn Off Video' : 'Turn On Video'} </button> <button onClick={() => setVideo(true, { fps: 15 })}> Force Video On </button> </div>);
Hook to access and manage video state
This hook provides video state management including: