Now You Can Embed Auto-Play Facebook Video On Your Site
With a little html code work, you can enable Facebook videos to play automatically with sound muted outside the social network.
Want to bring Facebook auto-play video to your site?
It’s now possible to enable Facebook’s auto-play on embedded videos from the social network.
The feature might appeal to publishers looking to leverage the video they produce for Facebook or to businesses looking for dynamic content to illustrate posts. The advantage of Facebook video — which has been embeddable on third-party sites only since March — is that it plays automatically without sound unless someone clicks, a feature that limits the surprise (or annoyance) factor for people who visit a page.
Here’s an example using a short video from the Red Bull Page:
How To Hack The Code
Embedding video with the auto-play enabled requires a bit of html code tweaking, and depending on the CMS you are working with your results might vary. For instance, to embed Facebook video on the Marketing Land WordPress installation, we must strip out the script and blockquote tags (and add a
After getting a Facebook video to play nicely on your site, it’s just a matter of adding data-autoplay=”true” in the proper location, like so:
One note: videos don’t auto-play on mobile devices. More information and full documentation is available on the Facebook Developers embedded video page.