我想通過URL播放視頻。我看到一些樣品,如下面代碼:iOS如何通過URL播放視頻
NSString *movieFile= [[NSBundle mainBundle] pathForResource:@"android" ofType:@"mp4"];
videoURL=[[NSURL alloc] initFileURLWithPath:movieFile];
moviePlayer=[[MPMoviePlayerController alloc] initWithContentURL:videoURL];
它只能播放本地resource.I喜歡寫一些代碼:
NSString* strurl [email protected]"https://s3.amazonaws.com/adplayer/colgate.mp4";
videoURL=[NSURL fileURLWithPath:strurl];
moviePlayer=[[MPMoviePlayerController alloc] initWithContentURL:videoURL];
但並沒有什麼... why..and如何通過網址播放視頻?
感謝~~這是OK.thanks爲您熱情幫助:) –
做到了解決這個問題? – pasine