我正在我的应用程序的 MPMoviePlayer 中播放视频,我正在从服务器获取视频。如果视频长度约为 25 秒或更长,则音频会中断。意味着在播放视频时,当视频播放到一半时,就听不到音频了。但是如果我寻找进度条,音频又来了。
任何人都可以帮助我吗?
moviePlayerController = [[MPMoviePlayerController alloc] init];
[moviePlayerController prepareToPlay];
moviePlayerController.shouldAutoplay = YES;
[moviePlayerController setScalingMode:MPMovieScalingModeAspectFit];
[[self.moviePlayerController view] setFrame:CGRectMake(0, 72, 320,180)];
[[self view] addSubview: [self.moviePlayerController view]];
self.moviePlayerController.useApplicationAudioSession = YES;
NSString *strng = @"http://qdemo_videos.s3.amazonaws.com/1360582540.mp4";
NSURL * adurl = [NSURL URLWithString:strng];
moviePlayerController.contentURL = url;
moviePlayerController.controlStyle = YES;
self.moviePlayerController.useApplicationAudioSession = YES;
[moviePlayerController play];