在iOS中自定义YouTube播放器

Yoa*_*oss 4 youtube-api ios ytplayerview

我有一个应用程序使用Youtube的YTPlayerView流式传输YouTube视频.我想开始自定义它(控制/旋转)几天后在网上搜索我找不到答案.

我所能找到的只是使用JS/Ruby/HTML来改变播放器.有没有人知道如何实现这一目标?

小智 5

播放器控件可以在下面描述的字典中给出,并且可以使用值0,1,2检查此链接以获取控件功能 https://developers.google.com/youtube/player_parameters#controls

NSDictionary *playerVars = @{
  @"controls" : @0,
  @"playsinline" : @1,
  @"autohide" : @1,
  @"showinfo" : @0,
  @"modestbranding" : @1
};
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
Run Code Online (Sandbox Code Playgroud)