问题
I want to embed Facebook videos in my app. I am getting video links from a webservice. For example:
"video_url": "https://www.facebook.com/urdutimes.ca/videos/520665921438799/"
Is it possible to embed this video in native iOS app using Objective-C?
Thanks in advance
回答1:
Try this one:
NSURL *url = [NSURL URLWithString:@"https://www.facebook.com/urdutimes.ca/videos/520665921438799/"];
MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
mp.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
[self presentMoviePlayerViewControllerAnimated:mp];
来源:https://stackoverflow.com/questions/35863694/play-facebook-videos-in-ios-application