The useVideo hook gathers functions responsible for managing state of video transmission.
import { useVideo } from '@dolbyio/comms-uikit-react';
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>
import { useVideo, IconButton } from '@dolbyio/comms-uikit-react';
const { isVideo } = useVideo();
<IconButton icon={isVideo ? 'camera' : 'cameraOff'} />;