谢谢您的帮助。
在我的网站上,我嵌入了YouTube视频。可能是视频未显示在Chrome中。它可以在Mac上运行,也可以在PC上运行,但只能在Firefox上运行。您可以在视频所在的位置“单击”该视频,它将开始播放,但不可见。我如何显示它。我以为它可能藏在东西后面,所以我弄乱了一些z-index东西,但是它不起作用。还有什么我应该看的吗?
代码是这样的:
<object type="application/x-shockwave-flash" id="myytplayer" data="https://www.youtube.com/v/FJqOb-TS-0o&enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0&rel=0" width="500" height="348">
<param name="allowScriptAccess" value="always">
</object>
该视频已从我的数据库中提取,但由YouTube托管。
这是firefox上的代码:
<object id="myytplayer" width="500" height="348" type="application/x-shockwave-flash" data="https://www.youtube.com/v/FJqOb-TS-0o&enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0&rel=0">
<param name="allowScriptAccess" value="always">
</object>
我尝试更新闪存驱动器以查看是否存在问题。我已经删除了我的cookie。我什至有其他人尝试过,但是它没有出现在chrome中。任何帮助都是极好的。
最佳答案
您的两个代码段都可以在我的Chrome 34 Windows 8.1计算机上正常运行。不知道您的问题来自哪里。也许是您尝试使用的计算机上特定于Chrome的系统/网络/代理设置(有时Youtube URL被公司网络禁止)。
无论如何,我都将指向Youtube documentation。也许尝试另一种形式的嵌入可以有所帮助:
Best practice: IFrame embeds are the recommended method for embedding a YouTube player because the IFrame will select the appropriate player based on the client's capabilities and available YouTube file formats.
如果您使用对象标签,则应该在其内部有一个嵌入标签falback(请参阅文档)。
关于google-chrome - Youtube视频未在Chrome中显示,但在Firefox中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23143420/