tags:

views:

859

answers:

5

Hi,

How to change size of MPMoviePlayerController views. Now it is covering full screen in landscape mode. Can we resize to half size or other size? I want display only half screen and other video related info display in remaining screen? Is it possible?

A: 

I don't think so--it wants to take over the entire screen.

David Maymudes
any one have any example for not covering full screen in itune or code? Plz pass to me...
Manu
A: 

MPMoviePlayerController take the entire screen. The only option for is to use a 3rd party video viewer library.

zaph
A: 

Acctually,you can change the size of the player. before you create the movie object, attach a selector, like this:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyWindowChanged:) name:UIWindowDidBecomeKeyNotification object:nil];

This way, when the new window of the player appears, you can grab it and change its size to fit your needs. You can also add the Overlay:

- (void) keyWindowChanged: (NSNotification *) aNot {

if([[[UIApplication sharedApplication] windows] count] > 1)
{
    NSArray *windows = [[UIApplication sharedApplication] windows];
    UIWindow * tmp = [windows objectAtIndex:1];//[aNot object];
    movOverlay = [[UIView alloc] initWithFrame:CGRectMake(10, 40, 30, 40)];
    movOverlay.backgroundColor = [UIColor purpleColor];
    [tmp addSubview:movOverlay];
    ...
} 

}

all the best, RonB

RonB
A: 

i tried the above code. But its not working. Can anyone tell me whats the prob. i need to change the size of the screen to customise.. plz help me

glenda
A: 

what's name 3rd party video viewer library??

"MPMoviePlayerController take the entire screen. The only option for is to use a 3rd party video viewer library."

BrightJun