EmbeddedVideo
Embeds a public Facebook video on your page.
The EmbeddedVideo component renders an embedded Facebook video using the fb-video XFBML class. The video must be public to be embeddable.
Try it live
Toggle autoplay, captions, and fullscreen in the Playground.
Import
import { EmbeddedVideo } from 'react-facebook';
Props
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | required | The URL of the Facebook video to embed. |
width | number | string | undefined | Width of the embedded video in pixels. |
showText | boolean | false | Show the text content associated with the video. |
allowFullScreen | boolean | false | Allow the video to be played in full-screen mode. |
autoPlay | boolean | false | Automatically start playing the video. |
showCaptions | boolean | false | Show captions (subtitles) by default. |
lazy | boolean | false | Lazy-load the embedded video. |
className | string | '' | Additional CSS class names appended to the container. |
Usage
Basic
<EmbeddedVideo href="https://www.facebook.com/facebook/videos/10153231379946729/" />
With All Options
<EmbeddedVideo
href="https://www.facebook.com/facebook/videos/10153231379946729/"
width={500}
showText
allowFullScreen
autoPlay={false}
showCaptions
/>
Autoplay with Full Screen
<EmbeddedVideo
href="https://www.facebook.com/facebook/videos/10153231379946729/"
width={640}
autoPlay
allowFullScreen
/>