Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-18-2009, 05:26 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default Making a movie loop *help*

I need some code for making a video loop.
Thanks!
tackey123 is offline   Reply With Quote
Old 10-18-2009, 09:01 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default

Anybody???
tackey123 is offline   Reply With Quote
Old 10-18-2009, 09:13 PM   #3 (permalink)
iPhone Developer
 
kohjingyu's Avatar
 
Join Date: May 2009
Location: Singapore
Posts: 326
Default

See Apple's sample code...MoviePlayer or something.
__________________
Bacteria Bash
Cheese Collect
Jokestar
Follow me on Twitter for news about my apps:
(Website|Twitter)
kohjingyu is offline   Reply With Quote
Old 10-18-2009, 09:51 PM   #4 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default

Quote:
Originally Posted by kohjingyu View Post
See Apple's sample code...MoviePlayer or something.
I can't find any thing on making video loop.
tackey123 is offline   Reply With Quote
Old 10-18-2009, 09:59 PM   #5 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Australia
Posts: 180
Default

im not sure if you can do this, but give it a try.

when video didfinishplayback
// play the movie again.
[mpplayer play];

try that
svveet is offline   Reply With Quote
Old 10-19-2009, 12:37 PM   #6 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default

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
tackey123 is offline   Reply With Quote
Old 10-19-2009, 08:14 PM   #7 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Australia
Posts: 180
Default

you need to create and listen to the notification,

didfinishplayback notification (check out apple sample code)

then after finish, try play the movie again.
svveet is offline   Reply With Quote
Old 09-11-2011, 09:47 PM   #8 (permalink)
App Developer
 
mongoose250's Avatar
 
Join Date: Dec 2008
Location: Indiana
Posts: 25
Send a message via ICQ to mongoose250 Send a message via AIM to mongoose250
Default

myPlayer.repeatMode = MPMovieRepeatModeOne; /// LOOPS MOVIE FOREVER
mongoose250 is offline   Reply With Quote
Reply

Bookmarks

Tags
help!, looping, sdk, video

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» 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
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:29 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0