您可以在不启用自动播放的情况下隐藏 YouTube 嵌入的控件吗? [英] Can you hide the controls of a YouTube embed without enabling autoplay?

查看:28
本文介绍了您可以在不启用自动播放的情况下隐藏 YouTube 嵌入的控件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<iframe width="100%" height="100%" src="//www.youtube.com/embed/qUJYqhKZrwA?autoplay=1&showinfo=0&controls=0" frameborder="0" allowfullscreen>

如果您删除 ?autoplay=1,视频将无法播放.看起来你不能在没有启用自动播放的情况下使用控件参数.

If you remove ?autoplay=1 the video does not work. Looks like you cannot use the controls parameter without autoplay enabled.

不知道为什么 YouTube 嵌入文章中没有提到这一点.

Not sure why this is not mentioned in the YouTube embed writeup.

希望我错了.

https://developers.google.com/youtube/player_parameters#controls

推荐答案

Set autoplay=0

Set autoplay=0

<iframe width="100%" height="100%" src="//www.youtube.com/embed/qUJYqhKZrwA?autoplay=0&showinfo=0&controls=0" frameborder="0" allowfullscreen>

如下所示:Autoplay=0 测试

这篇关于您可以在不启用自动播放的情况下隐藏 YouTube 嵌入的控件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆