我不能让Youtube API工作
I can't get Youtube API To Work
我希望玩家在点击div (.closed)时停止,但它不起作用。有人能看出我哪里错了吗?
我在头部添加了
<script type="text/javascript" src="http://www.youtube.com/player_api"></script>
我在jQuery中有这个
closed.click(function () {
player.stopVideo();
movie.delay(1000).animate({
bottom: -500
}, {
duration: 1000
});
});
**这也扰乱了动画*
在我的代码中。
<div id="movieContainer">
<div id="movie">
<iframe id="player" width="644" height="410" src="http://www.youtube.com/embed/VG9AGf66tXM?rel=0&wmode=Opaque&enablejsapi=1" frameborder="0" allowfullscreen></iframe>
<div class="close"></div>
</div><!--End of Movie -->
</div><!-- End of movieContainer -->
如何获得玩家的参考?应该是这样的:
var player = document.getElementById("player");
player.stopVideo();
相关文章:
- 谷歌地图Api和JS代码不工作
- Backbone/Facebook API未按预期工作
- 在自动完成中使用Google Maps Places API;API不工作
- 给出<选项>标记一个类?API调用不工作
- Youtube Javascript API播放/暂停/停止不工作
- AWS API网关返回400错误请求,但Postman工作正常
- 天气应用 API 不再工作
- $.getJSON 和 google fonts API 停止在 Internet Explorer 中工作,jQuer
- 谷歌地图API停止在Wordpress模板中工作
- Yelp API、OAuth和Angular与JSONP只工作一次
- 噩梦与YouTube API和播放视频工作
- 在iPhone上,Vimeo Javascript API.play()函数没有'播放完视频后才能工作
- 如何让蒸汽 API 工作
- 谷歌图表api工作不正常
- 我不能让Youtube API工作
- 谷歌地图的js api工作在浏览器上,但不是在cordova应用程序
- 谷歌地图API工作时,我打破然后继续,不'否则
- 谷歌地方自动完成api工作无处不在,但子域
- 路由到api工作错误
- 巨人炸弹 API 工作