I use YTPlayer to play videos on YouTube. The video plays correctly, but when I click Finish, which method is called?
-(void)playerView:(nonnull YTPlayerView *)playerView didChangeToState:(YTPlayerState)state;
This method calls when you click on done, pause, etc.
[[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 }