The useVideo hook gathers functions responsible for managing state of video transmission.
Name | Type | Description |
---|---|---|
isVideo |
boolean | Indicates video state of local user. |
toggleVideo |
() => void | Toggles video of local user. |
const { toggleVideo } = useVideo();
...
<button onClick={toggleVideo}>...</button>
const {isVideo} = useVideo()
<IconButton icon={isVideo ? "camera" : "cameraOff" }/>