sahara108
sahara108

Reputation: 2859

YouTube iFrame hide info

I know about showinfo parameter of YouTube API. But it doesn't match my requirement. After finish playback, the video info will be shown again. Is there anyway to completely hide video info?

Upvotes: 1

Views: 201

Answers (2)

JAL
JAL

Reputation: 42449

If you're using the youtube-ios-player-helper, you can implement the delegate method:

- (void)playerView:(YTPlayerView *)ytPlayerView didChangeToState:(YTPlayerState)state

and check for kYTPlayerStateEnded. When the video ends, the callback will fire indicating that the video has ended. You can then do whatever you requirement is, completely hide the player or the YTPlayerView, load a different view, etc,

Upvotes: 1

Rakii
Rakii

Reputation: 75

Try this with the playerVars parameter combination

NSDictionary *playerVars = @{
                             @"controls" : @0,
                             @"playsinline" : @1,
                             @"autohide" : @1,
                             @"showinfo" : @0,
                             @"modestbranding" : @1,
                             @"rel":@0
                             };

Upvotes: 0

Related Questions