Embedded Video parameter reference

An embedded video supports customization in data-* attributes and a JavaScript factory function. This reference document describes parameters used in all formats.

Reference the oEmbed API with widget_type=video to set these parameters as part of an HTML response for a Tweet ID or URL.

Parameters

Parameter Description Example
id The numerical ID of the desired Tweet. "560070183650213889"
lang A supported Twitter language code. "es"

HTML example

<blockquote class="twitter-video"
 data-lang="es">
<p>You can now shoot, edit and share video on Twitter. Capture life's most moving moments from your perspective.
<a href="http://t.co/31JoMS50ha">
  pic.twitter.com/31JoMS50ha
</a></p>
— Twitter (@twitter)
<a href="https://twitter.com/twitter/status/560070183650213889">
  enero 27, 2015
</a>
</blockquote>

JavaScript factory example

Note: the numeric Tweet ID should be passed as a string.

twttr.widgets.createVideo(
  "560070183650213889",
  document.getElementById("video-container"),
  {
    lang: "es"
  }
);