React Facebook

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

PropTypeDefaultDescription
hrefstringrequiredThe URL of the Facebook video to embed.
widthnumber | stringundefinedWidth of the embedded video in pixels.
showTextbooleanfalseShow the text content associated with the video.
allowFullScreenbooleanfalseAllow the video to be played in full-screen mode.
autoPlaybooleanfalseAutomatically start playing the video.
showCaptionsbooleanfalseShow captions (subtitles) by default.
lazybooleanfalseLazy-load the embedded video.
classNamestring''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
/>

On this page