Customizing YouTube Player in iOS

☆樱花仙子☆ 提交于 2021-02-07 18:36:50

问题


I have an app that streams YouTube videos using the YTPlayerView by Youtube. I want to start customizing it (controls/ rotation) After a few days searching on the web i couldn't find an answer to this.

All i could find is using the JS/Ruby/HTML to alter the player. Does any one know of a way to accomplish this?


回答1:


The player controls can be given in the dictionary described below and can have the values 0,1,2 check this link for the control functionality 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];


来源:https://stackoverflow.com/questions/25477719/customizing-youtube-player-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!