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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 08-09-2010, 03:14 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 3
dagabe14 is on a distinguished road
Default playing a movie on iPad, landscape, NOT fullscreen

Hello,

I am unsure if this is the correct forum to post this, but I figured I start somewhere.

I am looking to play a movie, on landscape (left to be exact), not fullscreen mode. I have looked in various places.

Is this even possible? I know that the setOrientation method is not supported for the iPad, and I couldn't get the shouldAutoRotate to work properly.

Thanks!
dagabe14 is offline   Reply With Quote
Old 08-09-2010, 03:31 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 3
dagabe14 is on a distinguished road
Default

Quote:
Originally Posted by dagabe14 View Post
Hello,

I am unsure if this is the correct forum to post this, but I figured I start somewhere.

I am looking to play a movie, on landscape (left to be exact), not fullscreen mode. I have looked in various places.

Is this even possible? I know that the setOrientation method is not supported for the iPad, and I couldn't get the shouldAutoRotate to work properly.

Thanks!
for anyone curious, I am still researching this, but it seems that the iPad only supports portrait when not in fullscreen.

Please someone prove this wrong!
dagabe14 is offline   Reply With Quote
Old 08-16-2010, 11:27 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 3
dagabe14 is on a distinguished road
Default

Quote:
Originally Posted by dagabe14 View Post
for anyone curious, I am still researching this, but it seems that the iPad only supports portrait when not in fullscreen.

Please someone prove this wrong!
/sigh, i just proved myself wrong

mpmovieplayercontroller contains a view, and can be affected by affine transformations...

Code:
- (void)startMovie:(NSString *)movieFilename
{
	NSString *url = [[NSBundle mainBundle] pathForResource:movieFilename ofType:@"mov"];
	player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
	
	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:player];
	
	CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(M_PI / 2.0f);
	player.view.frame = CGRectMake(40, 392, 320, 240);
	[player.view setTransform:landscapeTransform];
	[parentView addSubview:player.view];
	[player play];
}
And there we have a video playing landscape, not fullscreen, without the need for whatever rotate function mpmovieplayercontroller used to have.

i hope whoever reads this find this useful.
dagabe14 is offline   Reply With Quote
Reply

Bookmarks

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: 336
10 members and 326 guests
arash5500, HemiMG, iram91419, linkmx, mediaspree, Objective Zero, Paul Slocum, stanny, Touchmint, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,656
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, iram91419
Powered by vBadvanced CMPS v3.1.0

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