4
我想在我的應用程序中嵌入Facebook視頻。我從web服務獲取視頻鏈接。 例如:在ios應用程序中播放Facebook視頻
"video_url": "https://www.facebook.com/urdutimes.ca/videos/520665921438799/"
是否有可能使用Objective-C嵌入該視頻在原生iOS應用?
在此先感謝
我想在我的應用程序中嵌入Facebook視頻。我從web服務獲取視頻鏈接。 例如:在ios應用程序中播放Facebook視頻
"video_url": "https://www.facebook.com/urdutimes.ca/videos/520665921438799/"
是否有可能使用Objective-C嵌入該視頻在原生iOS應用?
在此先感謝
試試這個:
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];
它不工作 –
是的,這是可能的。 – Hima
您可以使用'MPMoviePlayerController' –
您可以告訴我如何,因爲我已經讀了其他地方,MPMoviePlayerController需要直接鏈接到視頻像http://www.example.com/test.mp4 –