1

I'm using YTPlayerView from the youtube-ios-player-helper library for video playback, but want to hide the share button in the top right corner that comes with it - anyone have a solution?

I've circled what I'm talking about here:

enter image description here

rigdonmr
  • 2,662
  • 3
  • 26
  • 40

2 Answers2

4

Solved it by passing these parameters:

let playerVars = [
  "modestbranding": 1,
  "showinfo": 0
]
playerView.loadWithVideoId(video.id, playerVars: playerVars)
rigdonmr
  • 2,662
  • 3
  • 26
  • 40
  • Hi! How did you hide the YouTube logo that appears in the bottom right corner? And also is it possible to change the play icon? – Ne AS Nov 10 '16 at 16:56
  • You cannot hide the YouTube icon, but you can prevent it from being pressed by placing a transparent view over it. Don't think you can change the play button. – rigdonmr Nov 10 '16 at 18:01
1

In iOS platform, just pass showinfo parameter to 0 before load the video:

NSDictionary *paramDic = @{
        @"showinfo": @0
    };

[self.playerView loadWithVideoId:@"M7lc1UVf-VE" playerVars:paramDic];
light_bo
  • 21
  • 3