Category Archives: wp-youtube-lyte

Wanted: testers for WP YouTube Lyte (the one with the new YT API)

As I wrote a couple of weeks ago, YouTube is shutting down their old v2 API, forcing WP YouTube Lyte to swith to v3. The main change; users will have to get an API key from Google and provide that in the Lyte settings page.

Initial development & testing has been done (this blog switched already) and I now need some brave souls to test this. You can download the “beta” from https://downloads.wordpress.org/plugin/wp-youtube-lyte.zip and report back here or on the wordpress.org support forum about how that did or did not work for you.

Looking forward to having to fix some nasty bugs until everything will finally be in it’s right place once again ;-)

Osunlade ft Erro Everything In Its Right Place

Watch this video on YouTube or on Easy Youtube.

WP YouTube Lyte and YouTube API v2 end of life

The YouTube API v2 is now officially to be shut down soon after April 20th. That’s bad news for WP YouTube Lyte, which uses this version of the API to perform unauthenticated read-only requests to fetch a.o. video title and thumbnail information (example here). The v3 API is supposed to simpler yet more powerful and migrating should not be a big problem, except for that little detail that v3 doesn’t allow unauthenticated requests at all. So I’ll need to add authentication (via an API key) to the mix, leaving me with the dilemma of having to choose between these approaches, none of which I really like:

  1. Tell WP YouTube Lyte users to get their own API key and have them enter it in the plugin’s settings-page. Risk: upsetting users who all of a sudden have to get an API key (“huh, what key?”)
  2. Get an API key myself and hardcode that in WP YouTube Lyte. Risk: abuse of that key (and neither a server key nor a browser key is applicable really), reaching limits, being denied access.
  3. Create and operate a proxy application that sits between the v3 API and each and every WP YouTube Lyte instance, taking care of authentication with an API key. Risk: having to write & install that proxy application, making sure it is available 24/7 (it’s a single point of failure) + obviously the same abuse-risk as in (2).

No, I’m definitively not happy … :-(

Bye 2014, it was nice knowing ya!

this used to be an animated gif, click to see itWith 2014 finally behind us, we can start dwelling on that past as of yesterday. These are some of my 2014 facts & figures:

About my blog:

My WordPress plugins:

  • Autoptimize
    • 2 major and 7 minor releases
    • 141324 downloads, bringing the total to 241650
    • answered lots of questions and feedback on the support-forum, allowing me to improve both the code and the FAQ.
    • 2015 will bring Autoptimize 2.0 (fixing the occasional WSOD & the cache-size problem) and Autoptimize Power-Ups (extensions for professional & power-users)
  • WP YouTube Lyte:
    • 2 major and 2 minor releases
    • 36507 downloads, now totalling 210285
    • 2015 will see continued improvements and WP YouTube Lyte Power-Ups (you guessed it, extensions for professional & power-users)
  • WP DoNotTrack:
    • 2 minor releases
    • 4312 downloads, now 12009 total
    • 2015 really should see a 1.0 release, which will finally include CSP-enforced protection.

Bye 2014, it was nice knowing ya, but I’m off enjoying 2015 now!

WP YouTube Lyte now parses normal YouTube links as well

I was just being a jealous guy, seeing how normal YouTube embeds (oEmbeds) got previewed nicely in WordPress 4.0 TinyMCE editor. This had been on my wishlist for a long time already and I looked into enabling that for httpv-links and lyte-shortcodes as well, but that turned out not to be that simple.

So I took the alternative approach, enabling WP YouTube Lyte to act on normal YouTube-links (a much requested feature anyhow) and thereby piggy-backing on the TinyMCE-improvement in 4.0. So there you have it; lyte video’s can be inserted using normal YouTube links and that will result in a (non-lyte) preview of the video in the visual editor content box.

1.5 as a number of other improvements and bugfixes, but you can read all about those in the changelog.

Have fun with this small Rick James like party-track to celebrate 1.5.0 (and my birthday, while we’re at it);

Mark Ronson – Uptown Funk ft. Bruno Mars

Watch this video on YouTube or on Easy Youtube.

WP YouTube Lyte 1.4.0; support for accessibilityFeature

A new version of WP YouTube Lyte was released over the weekend. Benetech, a U.S. nonprofit that develops and uses technology to create positive social change, offered a patch that adds the accessibilityFeature property to videos that have captions. If you have microdata enabled, WP YouTube Lyte now will automatically check if captions are available and if so, adds the accessibilityFeature property with value “captions” to the HTML-embedded microdata.

As YouTube only offers information on captions in their API v3, which requires authentication, the check is done in a separate, asynchronous call via a proxy-webservice on api.a11ymetadata.org. You can see an example of what the response looks like here and look at the source code on Github. This webservice-request for captions can be disabled by simply switching off microdata. Alternatively, if you want microdata but not the accessibilityFeature-property, you can use the “lyte_docaptions”-filter to set captions to false (you can find an example in lyte_helper.php_example).

This was the first time someone actively submitted code changes to add functionality to a project of mine, actually. Working with Benetech was a breeze and GitHub is a great platform to share, review and comment code. I for one am looking forward to more high-quality contributions like this one!

Looking at 2013 disappearing fast in the rear view mirror

rearview mirror by Alvaro on FlickrAnother year behind us, another overview in numbers (as done previously for 2011 and 2012).

On a personal note, 2013 has not been the easiest of years, but our lovely daughter’s “lentefeest” (a non-religious rite of passage for 6-year olds) and our holiday in Italy were great highlights though.

Mobile WP YouTube Lyte; no-one said it would be easy!

WP YouTube Lyte and mobile, I must be honest, it is not an easy marriage. Light YouTube Embeds focuses on optimizing performance by displaying a dummy player which takes less then a tenth of what a normal YouTube embed requires. Only when clicking on that dummy player, the real YouTube embed is loaded and auto-played. Simple and efficient, no?

Mobile is an whole other ballgame. For starters, there’s no autoplay on YouTube mobile embeds. At all, because Apple prohibits autoplay in HTML5 video and browsers on Android seem to agree. So the trick with the dummy player does not work (unless you would accept users having to click twice) and as a consequence, WP YouTube Lyte on mobile loads the (mobile) embed straight away.

But that’s not all; for audio-only to work, auto-hide has to be disabled (as the bottom controls are the only player elements that remain visible) but that despite setting autohide=0&controls=1, controls still remain hidden in mobile YouTube embeds, rendering the audio-only player UI useless, as a consequence of which WP YouTube Lyte has to show the full video on mobile. And YouTube playlists on mobile are known to be broken as well, one can only hope this is being worked on by YouTube.

And then one week ago a user posted about yet another mobile-specific problem on the wordpress.org WP YouTube Lyte supportforum; when rotating your smartphone or tablet, the size of the embedded video did not adjust. The reason in a nutshell; while LYTE (the dummy player) is responsive, the YouTube iframe-embed that is loaded on mobile is not. To solve this, I added an orientationchange event handler (WebKit-only to my disappointment, although I do have an alternative approach that I might introduce at a later stage) in version 1.3.3 which I released earlier today, re-requesting the embed when the orientation changes.

The conclusion; WP YouTube Lyte works on mobile, but it is not the most elegant of solutions at this particular stage. So in the spirit of full disclosure; if desktop & performance are key, then WP YouTube Lyte remains one of the best solutions for YouTube on WordPress out there, but if your main target audience is mobile web, you should at least be aware of these limitations (some of which also exist outside of WP YouTube Lyte).