import { Meta } from '@storybook/blocks'; # FeaturedVideoTileProvider The `FeaturedVideoTileProvider` provides the tile ID of the **most** active speaker, if the speaker is sharing video. If there are no active speakers, or the active speaker is not sharing video, there will be no tile ID. ## State ```javascript { tileId: number | null; } ``` You can access the state with the `useFeaturedTileState` hook. ## Usage If you are using `MeetingProvider`, the `FeaturedVideoTileProvider` is rendered by default. ```jsx import React from 'react'; import { MeetingProvider, useFeaturedTileState, } from 'amazon-chime-sdk-component-library-react'; const App = () => ( ); const MyChild = () => { const { tileId } = useFeaturedTileState(); return (
{tileId ? `Tile ${tileId} is featured` : 'No featured tiles'}
); }; ``` ## Usage without MeetingProvider If you opt out of using `MeetingProvider`, you can drop in the `FeaturedVideoTileProvider` and use its state. Make sure that its dependencies are rendered higher in the tree. ```jsx import React from 'react'; import { RemoteVideoTileProvider, ActiveSpeakersProvider, FeaturedVideoTileProvider, } from 'amazon-chime-sdk-component-library-react'; const App = () => ( ); ``` ### Dependencies - `AudioVideoProvider` - `RemoteVideoTileProvider` - `ActiveSpeakersProvider`