我正在使用YTPlayer播放YouTube视频。视频正在播放但是当我点击完成按钮时,哪个方法被调用?
答案 0 :(得分:1)
-(void)playerView:(nonnull YTPlayerView *)playerView didChangeToState:(YTPlayerState)state;
当您单击“完成”,“暂停等”时,将调用此方法。
答案 1 :(得分:0)
[[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
}