有没有办法让YTPlayerView在iPad上全屏播放? [英] Is there a way to get YTPlayerView to play full screen on an iPad?

查看:175
本文介绍了有没有办法让YTPlayerView在iPad上全屏播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

loadWithVideoId:playerVars:我将 playsinline 设置为 @ 0

我也在调用 ytPlayer.webView.allowsInlineMediaPlayback = NO;

视频在iPhone上全屏播放,但在iPad上的网页视图中播放。

The video plays full screen on iPhone, but plays inside the web view on the iPad.

我怎样才能获得在iPhone和iPad上全屏播放?

How can I get full screen playback on both iPhone and iPad?

推荐答案

找到YTPlayerView-iframe-player.html文件并添加以下css样式。

Find the YTPlayerView-iframe-player.html file and add the following css style.

<style>
    body { margin: 0; width:100%%; height:100%%; }

    html { width:100%%; height:100%%; }
</style>

我看到YTPlayerView在iPhone和iPad上全屏播放。

I see YTPlayerView play in fullscreen on iPhone and iPad both.

这篇关于有没有办法让YTPlayerView在iPad上全屏播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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