-1
在我的应用我要玩2个网址视频陆续播放从URL一个2个视频。陆续
这是我的代码:
` - (无效)viewDidLoad中{
NSLog(@"viewDidLoad");
player = [[MPMoviePlayerController alloc] initWithContentURL:[self movieURL]];
[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player play];
[超级vieDidLoad]; }
- (NSURL *)movieURL {
return [NSURL URLWithString: @"https://s3.amazonaws.com/adplayer/colgate.mp4"];//First video url after this video complete.I want to play the next url video.
}
- (void) movieFinishedCallback:(NSNotification*) aNotification {
NSLog(@"movieFinishedCallback");
player = [aNotification object];
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player autorelease];
}
`
后一个网址视频完成我想玩下一个URL的视频。
请任何人帮助我。
我有存储URL在数组这样,
array=[[NSArray alloc] initWithObjects:@"https://s3.amazonaws.com/adplayer/colgate.mp4",@"https://s3.amazonaws.com/ventuno-platform-flv-sep2010/happy_family.mp4",nil];
那我该怎么retrive的URL - (空)movieFinishedCallback:(NSNotification *)aNotification {
} method.please给予我指导这个。
@Harinder:如何网址存储在一个array.and我怎么能retrive URL的一个由one.please给我一个样品code.please保存我的生活。谢谢你 – kanmani 2011-02-18 10:06:37