WordPress.org

Plugin Directory

WP YouTube Lyte

High performance YouTube video, playlist and audio-only embeds which don't slow down your blog and offer optimal accessibility.

What does "html5 video support" mean?

When playing, HTML5 video will not be visible for everyone (see requirements). Indeed some visitors will see the fallback Flash video instead.

What are the requirements to see embedded YouTube HTML5 video?

  • It only works in browsers that support the h264 (Safari, Chrome, IE9) or WebM (currently Chrome, Opera and Firefox) video codecs
  • Your visitor has to be enrolled in the YouTube html5 beta except if no Flash in present, in which case YouTube will attempt to fall-back to HTML5 as well

Does WP YouTube Lyte protect my visitor's privacy?

As opposed to some of the most important plugins there is no 3rd party tracking code in WP YouTube Lyte, but YouTube off course does see visitor requests coming in (see also the youtube-nocookie.com remark in Bugs/Issues below).

If you want to stop YouTube from setting cookies, add the "&showinfo=0" parameter to your httpv-url. This will prevent the call to the Youtube API, which is used to fetch the title of the video, and stop YouTube-cookies from being set when the LYTE-player is loaded. This however does not work for playlists (the API-call is needed to be able to present something meaningful). You should also take into account that any user actually playing the video, will always receive YouTube-cookies (as is the case with youtube-nocokie embeds as well).

Can I use WP YouTube Lyte for a custom field?

Just pass the httpv url of such a field to lyte_preparse like this:

if(function_exists('lyte_preparse')) { echo lyte_preparse($video); }

and you're good to go!

Does WP YouTube Lyte work with Infinite Scroll?

Starting from version 1.1.0 it does; in Infinite Scroll's configuration you just have to add "ly.te()" in the "Javascript to be called after the next posts are fetched"-box.

Can I still integrate with YouTube's JS API?

This was added as a beta feature in version 1.1.0; add ?enablejsapi=1 to the httpv URL. WP YouTube Lyte will pick this up, and add ?enablejsapi=1&origin= to the URL of the iFrame with the iFrame id being set to iF_. As soon as your visitors plays the video, you should be able to hook up with the video.

How does WP YouTube Lyte support microdata?

  • There is a specific microdata scheme for "videoObject" which WP YouTube Lyte can add to your page, which Google can use to display the video thumbnail next to the search-result
  • This is optional and can be disabled in the options page
  • The videoobject microdata is NOT added for audio-only embeds, playlists or widgets
  • Google will not always display the thumbnail, this presumably depends of the relevance of the video to the rest of the page.

How does captions-support get added to the microdata?

In January 2014 Benetech, a U.S. nonprofit that develops and uses technology to create positive social change, offered a patch that adds the accessibilityFeature property to the microdata for videos that have captions. If you have microdata enabled, WP YouTube Lyte will automatically try to check (in a seperate, asynchronous call via a proxy-webservice, as YouTube only offers captions in their API v3 which requires authentication) if captions are available and if so, adds the accessibilityFeature property with value captions to the microdata. This can be disabled by either disabling microdata or, if you want microdata but not the accessibilityFeature-property by using the "lyte_docaptions"-filter to set captions to false (example-code is in lyte_helper.php_example).

Responsive LYTE embeds

  • The video width in posts and pages will adapt to the width of the container (the div) in which your blogposts/ pages are shown. This means that if your theme is responsive, WP YouTube Lyte will follow.
  • Widgets are not responsive.
  • if the content div width gets to around 200 pixels, the LYTE UI will become garbled (YouTube requires the minimum embed width to be 200px as well).

Can I use WP YouTube Lyte on normal YouTube links?

Yes, starting with version 1.5.0 normal YouTube links are automatically transferred in Lyte embeds as well. You will automagically also get a (non-Lyte) preview of the video in your visual post edit screen.

What can I do with the API?

A whole lot; there are filters to pre-parse the_content, to change settings, to change the CSS, to change the HTML of the LYTE-div, ... There are examples for all filters (and one action) in lyte_helper.php_example

How can I use/ activate lyte_helper.php_example?

Copy it to /wp-content/plugins/lyte_helper.php and activate it in WordPress' plugin page. After that you can simple remove the one of the comment-sequences (double-slash) to activate one (or more) of the functions in there.

Problem with All In One Seo Pack

All in One SEO Pack be default generates a description which still has httpv-links in it. To remove those, you'll have to use lyte_helper.php (see above) and add lyte_filter_aioseop_description to the aioseop-filter in there.

When I click on a LYTE video, a link to YouTube opens, what's up with that?

You probably added a link ()around the httpv-url. No link is needed, just the httpv-url.

Any bugs/ issues should I know about?

  • Although the widget is available in (very) small sizes, these do not display that great and might, in the near future, be disabled by YouTube as their Terms of Service state that the smallest available embedded player is 200X200 pixels. Use the deprecated smaller sizes at your own risk.
  • Having the same YouTube-video on one page can cause WP YouTube Lyte to malfunction (as the YouTube id is used as the div's id in the DOM, and DOM id's are supposed to be unique)
  • As youtube-nocookie.com does not serve the HTML5-player, WP YouTube Lyte uses the youtube.com domain (which provides less privacy), but as soon as youtube-nocookie.com serves HTML5-video, this will become the default domain for WP YouTube Lyte again.
  • When using the Firefox plugin Karma Blocker, the video isn't visible when clicking "play", with a warning message being shown instead. This is expected behavior and should be solved by tweaking Karma Blocker's configuration.
  • The translations have not been updated entirely for version 1.2.0 and later. Help with translations is high on my wish-list, contact me if you are interested to help!

I found a bug/ I would like a feature to be added!

Just tell me, I like the feedback! Use the Contact-page on my blog, leave a comment in a post about wp-youtube-lyte or create a new topic on the wordpress.org forum.

How you can help

Requires: 2.9 or higher
Compatible up to: 4.1.1
Last Updated: 2014-12-19
Active Installs: 10,000+

Ratings

4.9 out of 5 stars

Support

6 of 8 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 50,2,1 100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,3,3
100,1,1 100,1,1
0,1,0 100,2,2 100,5,5
100,3,3 100,1,1 100,1,1 100,2,2
100,1,1
100,2,2
100,1,1 100,1,1 50,2,1 100,1,1 100,1,1 100,3,3 100,2,2 100,1,1 0,1,0 0,1,0
100,1,1 100,3,3 100,1,1
100,2,2 100,2,2 100,3,3 100,3,3 100,2,2 100,1,1
80,5,4 67,3,2 100,1,1
50,2,1
75,4,3 0,1,0 75,4,3
100,3,3 100,1,1 100,3,3
100,1,1
100,1,1 100,2,2 100,3,3 100,2,2
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1
100,1,1 67,3,2
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,2,2
100,2,2 100,3,3
100,2,2
100,1,1