为什么IE8无法加载YouTube播放器?
我有以下标记来在 jQuery 工具叠加层中加载 YouTube 视频播放器:
<a rel="#YouTubeVideo_MZKORPYI0HM" href="http://www.youtube.com/watch?v=mZkoRpyi0HM" title="Watch the YouTube video">
<img src="http://img.youtube.com/vi/mZkoRpyi0HM/2.jpg" class="youtubeThumbnail withBorder" alt="Watch the video" width="134" height="100"/>
</a>
<div id="YouTubeVideo_MZKORPYI0HM" class="overlay youtube rounded">
<object width="640" height="505"
type="application/x-shockwave-flash" id="YouTubeVideo_MZKORPYI0HM_Player" data="http://www.youtube.com/v/mZkoRpyi0HM?video_id=mZkoRpyi0HM&version=3&enablejsapi=1&playerapiid=ytplayer">
<param name="allowScriptAccess" value="always">
<param name="bgcolor" value="#cccccc">
</object>
</div>
该页面的行为与我在 Firefox(所有版本)和 Chrome 中所期望的完全一样。但是,在 IE8 中(并且我有最新的 Flash 插件),我在状态栏中看到“剩余 1 项”消息,并且覆盖层不包含 Flash 播放器。右键单击灰色空间会显示“电影未加载”消息。
如何诊断并解决IE8的这个问题?
I have the following mark-up to load a YouTube video player in a jQuery Tools overlay:
<a rel="#YouTubeVideo_MZKORPYI0HM" href="http://www.youtube.com/watch?v=mZkoRpyi0HM" title="Watch the YouTube video">
<img src="http://img.youtube.com/vi/mZkoRpyi0HM/2.jpg" class="youtubeThumbnail withBorder" alt="Watch the video" width="134" height="100"/>
</a>
<div id="YouTubeVideo_MZKORPYI0HM" class="overlay youtube rounded">
<object width="640" height="505"
type="application/x-shockwave-flash" id="YouTubeVideo_MZKORPYI0HM_Player" data="http://www.youtube.com/v/mZkoRpyi0HM?video_id=mZkoRpyi0HM&version=3&enablejsapi=1&playerapiid=ytplayer">
<param name="allowScriptAccess" value="always">
<param name="bgcolor" value="#cccccc">
</object>
</div>
The page behaves exactly how I would expect in Firefox (all versions) and Chrome. However, in IE8 (and I have the latest flash plug-in), I see a "1 item remaining" message in the status bar and the overlay contains no flash player. Right-clicking on the grey space shows a "movie not loaded" message.
How can I diagnose and solve this problem with IE8?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎将我的标记“升级”到 较新的建议嵌入 YouTube 视频的技术,即使用 iframe 就可以达到目的。
标记如下:
It seems that "upgrading" my mark-up to the newer suggested technique of embedding YouTube videos, i.e. using an iframe did the trick.
The mark-up is as follows: