我从facebook api得到"json"响应,我想播放由用户共享的视频。
我正在使用这个代码:
NSString *path =[[FacebookFeedarray objectAtIndex:(long)clicked.tag] objectForKey:@"source"];
NSURL *url = [NSURL fileURLWithPath:path];
moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:url];
moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
moviePlayer.shouldAutoplay = YES;
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
[moviePlayer play];
url为:https://video.xx.fbcdn.net/hvideo-xta1/v/t42.1790-2/11324750_10153450000004560_1780301857_n.mp4?efg=eyJybHIiOjMwMiwicmxhIjo1MTJ9& rl = 302, vabr = 168,哦= 9 c64b9ae34e1c1751d41ef2a4c4c220f& oe = 555 e0678
也添加这段代码。
[moviePlayer setMovieSourceType:MPMovieSourceTypeStreaming];
希望有帮助