Lindsey Mysse
Lindsey Mysse

Reputation: 21

Has Youtube Iframe Embed has stopped working for certain videos?

I created a JS fiddle for this here:

http://jsfiddle.net/lindseymysse/6C65Y/1/

The error:

Starting Yesterday evening, a few videos on the site I'm working on stopped loading for users. We are using the iframe embed, and attempting to do as much stuff with html5 as possible.

To reproduce this error:

If user is either

  1. Unenrolled/has not made a decision to turn html5 video on or

  2. User has turned html5 trial on, the video will not play on MacBook Chrome, Firefox or Safari.

If user either turns html5 trial on and then off, or (if they are already signed up for the html5 trial) just off, the embed will work

Some Clues:

The debug from a broken video looks like this:

Some More:

Please see my jsFiddle to reproduce the error.

What is causing this? This error is not throwing an error in the youtube api onError call, is there a way to spot it so we can deal with this?

Upvotes: 2

Views: 3645

Answers (1)

arttronics
arttronics

Reputation: 9955

YouTube indeed has changed their API over the last couple of days and flash fallback from their HTML5 Video Player fails. Other users report a black or blank YouTube Player Screen and a video duration of 0:00 which are other symptoms of this bug once the SWF player is presented.

I updated your jsfiddle.net with a workaround to only use the flash player from the initial start, which then prevents fallback from flash issue until it's resolved.

It retains your /embed/ scheme so any custom API that's used will still be valid.

The workaround adds the playlist param with no other video values and a comma, normally used to separate videos in the playlist, so that a playlist of 1 is realized.

Of course if your were already using a playlist, then you would not be subject to this bug since the playlist is the only flash exclusive item that forces the flash player to be rendered correctly in the /embed/ URL at the present time.

Here's the update:

http://jsfiddle.net/6C65Y/3/

Status Report: This YouTube API bug is not an issue any longer.

Upvotes: 2

Related Questions