Youtube Iframe Embed 是否已停止为某些视频工作? [英] Has Youtube Iframe Embed has stopped working for certain videos?

查看:24
本文介绍了Youtube Iframe Embed 是否已停止为某些视频工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里为此创建了一个 JS 小提琴:

I created a JS fiddle for this here:

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

错误:

从昨天晚上开始,我正在处理的网站上的一些视频停止为用户加载.我们正在使用 iframe 嵌入,并尝试使用 html5 做尽可能多的事情.

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.

要重现此错误:

如果用户是

  1. 未注册/尚未决定开启 html5 视频或

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

用户已开启 html5 试用,该视频将无法在 MacBook 上播放Chrome、Firefox 或 Safari.

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

如果用户打开然后关闭 html5 试用版,或者(如果他们已经注册了 html5 试用版)刚刚关闭,则嵌入将工作

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

一些线索:

来自损坏视频的调试如下所示:

The debug from a broken video looks like this:

  • 调试回放质量=小
  • scoville=1
  • cfps=0
  • pd=0
  • mos=0
  • 调试 flashVersion=MAC 11%2C2%2C202%2C235
  • fs=0
  • hl=en 美国
  • 调试日期=2012 年 5 月 10 日星期四 14%3A40%3A14 GMT%2D0700
  • iframe=1
  • lact=null
  • videoFps=0
  • vq=自动
  • h=355
  • stageFps=24
  • 调试错误=未指定
  • tpmt=0
  • framer=http%253A%252F%252Ffiddle%2Ejshell%2Enet%252FunPrz%252F5%252Fshow%252F
  • 音量=100
  • droppedFrames=0
  • w=473
  • el=detailpage
  • screenw=1440
  • screenh=900
  • 调试 videoId=
  • playerw=640
  • 调试源数据=

更多:

  • Mozilla 给出了错误:--意外的值对齐解析preserveAspectRatio 属性.
  • 我们发现,即使在 html5 试用版中,此嵌入的视频也能作为 Flash 视频播放.

请参阅我的 jsFiddle 以重现错误.

Please see my jsFiddle to reproduce the error.

这是什么原因造成的?这个错误不是在 youtube api onError 调用中抛出错误,有没有办法发现它以便我们可以解决这个问题?

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?

推荐答案

YouTube 在过去几天确实改变了他们的 API,并且从他们的 HTML5 视频播放器的 Flash 回退失败了.其他用户报告出现黑色或空白的 YouTube 播放器屏幕和 0:00 的视频时长,这是出现 SWF 播放器后此错误的其他症状.

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.

我用一种变通方法更新了您的 jsfiddle.net,从一开始就只使用 Flash 播放器,这样可以防止 Flash 问题的回退,直到它得到解决.

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.

它会保留您的/embed/方案,因此使用的任何自定义 API 仍然有效.

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

解决方法是在播放列表参数中添加没有其他视频值和逗号,通常用于分隔播放列表中的视频,从而实现播放列表为1.

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.

当然,如果您已经在使用播放列表,那么您就不会受到此错误的影响,因为播放列表是目前唯一强制 Flash 播放器在/embed/URL 中正确呈现的 Flash 专有项目.

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.

更新如下:

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

状态报告:此 YouTube API 错误不再是问题.

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

这篇关于Youtube Iframe Embed 是否已停止为某些视频工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆