我的以下代码在我的 iOS 4.3 测试手机上运行良好。但是当我在另一部装有 iOS 5.1 的手机上测试它时,它似乎不起作用。你能帮助我吗?
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:
[NSURL URLWithString: [defaults objectForKey:@"videoPath"]]];
player.view.frame = CGRectMake( 0, 0, 320, 198);
self.thePlayer = player;
[player release];
[self.cameraOverlayView addSubview:self.thePlayer.view];
[self.thePlayer play];