Reputation: 576
I am using YTPlayer for playing youtube video. video is playing correctly but when i click on Done button which method is call?
Upvotes: 2
Views: 633
Reputation: 133
-(void)playerView:(nonnull YTPlayerView *)playerView didChangeToState:(YTPlayerState)state;
This method invokes when you click on done, pause etc.
Upvotes: 1
Reputation: 1
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(closedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];
-(void)closedFullScreen:(NSNotification *)myNotification{
[self.playView pauseVideo];
//required stuff here like dismissing your AVFullScreenViewController
}
Upvotes: 0