Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Latest commit

 

History

History
35 lines (24 loc) · 830 Bytes

File metadata and controls

35 lines (24 loc) · 830 Bytes

useVideo

The useVideo hook gathers functions responsible for managing state of video transmission.

import { useVideo } from '@dolbyio/comms-uikit-react';

Members

Name Type Description
isVideo boolean Indicates video state of local user.
toggleVideo () => void Toggles video of local user.

Examples

React

Enable / disable video

const { toggleVideo } = useVideo();
...
<button onClick={toggleVideo}>...</button>

Use current state of video

import { useVideo, IconButton } from '@dolbyio/comms-uikit-react';
const { isVideo } = useVideo();

<IconButton icon={isVideo ? 'camera' : 'cameraOff'} />;