import { Meta, ArgTypes } from '@storybook/blocks';
import { LocalVideo } from './';

<Meta title="SDK Components/LocalVideo" />

# LocalVideo

The `LocalVideo` component renders a `VideoTile` for the local user's video.

The video can be started and stopped with the `useLocalVideo` hook once a meeting session has started.

## Importing

```javascript
import { LocalVideo } from 'amazon-chime-sdk-component-library-react';
```

## Usage

```jsx
import React from 'react';
import {
  MeetingProvider,
  LocalVideo,
  useLocalVideo
} from 'amazon-chime-sdk-component-library-react';

const App = () => {
  const { toggleVideo } = useLocalVideo();

  return (
    <MeetingProvider>
      <LocalVideo />
      <button onClick={toggleVideo}>Toggle video</button>
    </MeetingProvider>
  );
};
```

## Props

<ArgTypes of={LocalVideo} />
