Single Video Embeds

Embedding a single video into a website is easy and common. Nearly every video provider includes an "embed" option for each video that provides an HTML <iframe> that can be added to any website.
This article applies to TubePress when used in WordPress. Standalone PHP users should refer to this article instead.

Embedding a single video into a website is easy and common. Nearly every video provider includes an "embed" option for each video that provides an HTML <iframe> that can be added to any website. If you're reading this, you've probably done this countless times.

TubePress improves the embedding process by

  • Abstracting away the HTML. No need to copy and paste a long and complicated <iframe> snippet.
     
  • Allowing you to control the embedded video player (e.g. colors, behavior, size, etc).
     
  • Bringing in all of the video's meta information (length, description, author, keywords, etc). You can even have fine-grained control over how the meta information is presented via TubePress themes.
     

The image below shows what a difference this can make. On the left is a TubePress-generated single video embed, on the right is a "plain" embed from YouTube

Single video embed with TubePress
 

To embed a single video with TubePress, you simply need to give TubePress the ID of the video you'd like to show. TubePress will figure out which video provider (YouTube, Vimeo, etc) the ID belongs to and will fetch the video. For instance, if you want to embed the YouTube video with ID J51kfduN5aA, you would use something like the following:

<?php print TubePressPro::getHTML('video="J51kfduN5aA"');


Last Updated Feb 17, 2016 07:20PM PST
c65861bf7a72e1a8878bdf73cabbbdbf@tubepress.desk-mail.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete