使用ALMoviePlayerController
播放4到5个视频后,应用卡住了一段时间。随着用户播放更多视频,视频加载时间也会增加。
以下是一段代码:
moviePlayer = [[ALMoviePlayerController alloc] initWithFrame:vwFrame];
moviePlayer.shouldAutoplay=NO;
moviePlayer.view.alpha = 1.f;
moviePlayer.delegate = self; //IMPORTANT!
player = moviePlayer;
isSourceYTPlayer = NO;
[currentControlller.playerView insertSubview:moviePlayer.view atIndex:0];