为什么IE8没有加载YouTube播放器?

时间:2011-05-17 10:06:40

标签: flash internet-explorer-8 youtube jquery-tools

我有以下标记来加载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&amp;version=3&amp;enablejsapi=1&amp;playerapiid=ytplayer">
        <param name="allowScriptAccess" value="always">
        <param name="bgcolor" value="#cccccc">
    </object>
</div>

该页面的行为完全符合我在Firefox(所有版本)和Chrome中的预期。但是,在IE8中(我有最新的Flash插件),我在状态栏中看到“剩余1项”消息,而叠加层中没有闪存播放器。右键单击灰色空格会显示“未加载电影”消息。

如何使用IE8诊断并解决此问题?

1 个答案:

答案 0 :(得分:0)

似乎将我的加价“升级”到newer suggested technique of embedding YouTube videos,即使用iframe就可以了。

加价如下:

<iframe class="youtube-player" type="text/html" width="640" height="505" src="http://www.youtube.com/embed/mZkoRpyi0HM" frameborder="0"></iframe>