I want to make a demo app that plays video loaded from the network just with following sample code:
- (void)viewDidLoad {
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"http://ftp.cp.108tian.com/video/unity_animation.mov"];
AVPlayer *avp = [[AVPlayer alloc]initWithURL:url];
AVPlayerViewController *avpc = [[AVPlayerViewController alloc]init];
avpc.player = avp;
[self presentViewController:avpc animated:YES completion:nil];
}
And yes, I have added the AST
to allow HTTP transmission:
But I still get this error:
What happened? and how to solve this?