Open sunleic opened 6 years ago
在viewDidLoad中
#ifdef DEBUG [IJKFFMoviePlayerController setLogReport:YES]; [IJKFFMoviePlayerController setLogLevel:k_IJK_LOG_DEBUG]; #else [IJKFFMoviePlayerController setLogReport:NO]; [IJKFFMoviePlayerController setLogLevel:k_IJK_LOG_INFO]; #endif [IJKFFMoviePlayerController checkIfFFmpegVersionMatch:YES]; IJKFFOptions *options = [IJKFFOptions optionsByDefault]; // [options setOptionIntValue:2 forKey:@"videotoolbox" ofCategory:kIJKFFOptionCategoryPlayer]; // [options setPlayerOptionIntValue:1 forKey:@"videotoolbox"]; options.showHudView = YES; self.player = [[IJKFFMoviePlayerController alloc] initWithContentURL:url withOptions:options]; self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; self.player.view.frame = self.view.bounds; self.player.scalingMode = IJKMPMovieScalingModeAspectFit; self.player.shouldAutoplay = YES; self.view.autoresizesSubviews = YES; [self.view addSubview:self.player.view]; [self.player prepareToPlay]; [self.player play];
运行起来之后白屏,将APP进入后台之后然后再进入前台,视频界面就正常了
我也是同样的问题?
[options setOptionIntValue:2 forKey:@"videotoolbox" ofCategory:kIJKFFOptionCategoryPlayer];
请问解决了吗
在viewDidLoad中
运行起来之后白屏,将APP进入后台之后然后再进入前台,视频界面就正常了