Yoav Gross
Yoav Gross

Reputation: 41

Customizing YouTube Player in iOS

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?

Upvotes: 4

Views: 3060

Answers (1)

Rakii
Rakii

Reputation: 75

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];

Upvotes: 5

Related Questions