关于 javascript:Youtube iframe API – Android 全屏 | 珊瑚贝

Youtube iframe API – Android fullscreen


我正在使用 YouTube iframe api 嵌入视频。
在 iPhone 上播放视频时,视频会自动切换到全屏模式。我想知道是否可以在 Android 上强制执行相同的行为? (目前视频是内联播放的,看起来不太好)。


无法自动全屏播放视频。最接近的方法是将播放器放在全屏 div 中并使用 url 参数自动播放:

1
<iframe width=“100%” height=“100%” src=“//www.youtube.com/embed/fSy6uh-GjCc?controls=0&autoplay=1&showinfo=0” frameborder=“0” allowfullscreen></iframex>
  • 您能否澄清一下fullscreen div 是什么?在您的示例中, allowfullscreen 绑定到 iframe,而不是 div(据我了解,是父 div)。如果可能,请提供完整的样本
  • @AlexeyStrakh,您将使用 css 用 iframe 填充浏览器,例如iframe { 宽度:100%;高度:100%;位置:绝对; z-索引:2; }


来源:https://www.codenong.com/15634086/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9461.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?