Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
613 views
in Technique[技术] by (71.8m points)

html - 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:

  • debug playbackQuality=small
  • scoville=1
  • cfps=0
  • pd=0
  • mos=0
  • debug flashVersion=MAC 11%2C2%2C202%2C235
  • fs=0
  • hl=en US
  • debug date=Thu May 10 14%3A40%3A14 GMT%2D0700 2012
  • iframe=1
  • lact=null
  • videoFps=0
  • vq=auto
  • h=355
  • stageFps=24
  • debug error=Not specified
  • tpmt=0
  • framer=http%253A%252F%252Ffiddle%2Ejshell%2Enet%252FunPrz%252F5%252Fshow%252F
  • volume=100
  • droppedFrames=0
  • w=473
  • el=detailpage
  • screenw=1440
  • screenh=900
  • debug videoId=
  • playerw=640
  • debug sourceData=

Some More:

  • Mozilla gives the error: -- Unexpected value align parsing preserveAspectRatio attribute.
  • The videos we have found that this embed is broken on are ones that play as Flash videos even in the html5 trial.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...