Reputation: 2859
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
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
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