Is there a way to get YTPlayerView to play full sc

2019-04-05 16:48发布

In loadWithVideoId:playerVars: I'm setting playsinline to @0.

I'm also calling ytPlayer.webView.allowsInlineMediaPlayback = NO;.

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

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

1条回答
Animai°情兽
2楼-- · 2019-04-05 17:24

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>

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

查看更多
登录 后发表回答