嗨,我正在编写JavaScript代码,我正在浏览器控制台中运行,以控制嵌入iframe标签的youtube视频。 看来我不能更改已经写好的html代码。 因此,我创建了一个虚拟html页面来测试浏览器控制台中的JavaScript代码。
我试图写一个脚本,可以实现:
我试图在没有YouTube Iframe API的情况下实现它。 请帮帮我。
null
<html>
<body>
<div style="margin-left:30%;margin-top:8%;">
<iframe width="745" height="419" title="YouTube Video" class="ae-media ae-youtube" src="https://www.youtube.com/embed/2O4j4yh6gd8?rel=0&autoplay=0&autohide=1&modestbranding=1&showinfo=0" frameborder="0" allowfullscreen="" data-aesra-score="frameTitle:1;"></iframe>
</div>
</body>
</html>
null
YouTubeiframeAPI:如何控制已经在HTML中的iframe播放器?
在我的openion use video Tag中,由于iframe不能在跨浏览器中播放视频,特别是Internet explorer,我没有在所有浏览器上进行测试,使用这种方式播放视频,'''