 |
 |
|
 |
10-18-2009, 05:26 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Sep 2009
Age: 15
Posts: 93
|
Making a movie loop *help*
I need some code for making a video loop.
Thanks!
|
|
|
10-18-2009, 09:01 PM
|
#2 (permalink)
|
|
Registered Member
Join Date: Sep 2009
Age: 15
Posts: 93
|
Anybody???
|
|
|
10-18-2009, 09:13 PM
|
#3 (permalink)
|
|
iPhone Developer
Join Date: May 2009
Location: Singapore
Posts: 326
|
See Apple's sample code...MoviePlayer or something.
|
|
|
10-18-2009, 09:51 PM
|
#4 (permalink)
|
|
Registered Member
Join Date: Sep 2009
Age: 15
Posts: 93
|
Quote:
Originally Posted by kohjingyu
See Apple's sample code...MoviePlayer or something.
|
I can't find any thing on making video loop.
|
|
|
10-18-2009, 09:59 PM
|
#5 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Location: Australia
Posts: 180
|
im not sure if you can do this, but give it a try.
when video didfinishplayback
// play the movie again.
[mpplayer play];
try that
|
|
|
10-19-2009, 12:37 PM
|
#6 (permalink)
|
|
Registered Member
Join Date: Sep 2009
Age: 15
Posts: 93
|
is there any way to loop using this code;
Code:
#import "VideoPlayerViewController.h"
#import <MediaPlayer/MediaPlayer.h>
@implementation VideoPlayerViewController
- (IBAction)playMovie{
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"intro" ofType:@"mov"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
}
/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
}
return self;
}
*/
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
|
|
|
10-19-2009, 08:14 PM
|
#7 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Location: Australia
Posts: 180
|
you need to create and listen to the notification,
didfinishplayback notification (check out apple sample code)
then after finish, try play the movie again.
|
|
|
09-11-2011, 09:47 PM
|
#8 (permalink)
|
|
App Developer
Join Date: Dec 2008
Location: Indiana
Posts: 25
|
myPlayer.repeatMode = MPMovieRepeatModeOne; /// LOOPS MOVIE FOREVER
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 345 |
| 20 members and 325 guests |
| ADY, Alsahir, Dani77, e2applets, JasonR, keeshux, linkmx, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah |
| Most users ever online was 1,187, 10-11-2011 at 08:09 AM. |
» Stats |
Members: 158,880
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
|
| Welcome to our newest member, @sandris |
|