-1
視頻在陣列中。我想播放那些視頻。視頻在陣列中如何播放該視頻。 iphone
意味着視頻在服務器中。視頻進入陣列。我存儲在陣列IA字典從字典如何播放視頻
是下面的代碼是對還是錯的,如果它錯了,請告訴我正確的
enter code here NSMutableDictionary *dict;
dict =[Videoarray objectAtIndex:0];
NSURL *Movie = [[NSURL alloc] initWithString:[dict valueForKey:@"url"]];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:Movie];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
MPMoviePlayerController *movie = [[MPMoviePlayerController alloc] initWithContentURL:Movie];
movie.view.frame = CGRectMake(5,5,310, 165);
movie.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight |
UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
[scroll addSubview:movie.view];
[movie play];
您是否試過該代碼?什麼不起作用? – woz 2012-07-09 19:14:11
只有一個視頻即將到來,但在陣列中,所以可能有視頻如何檢索所有視頻。在iPhone – 2012-07-09 19:16:13
你希望他們連續播放,對嗎? – woz 2012-07-09 19:24:55