Ive tried implementing a MPMoviePlayerController to play mp3's. Problem is my app is entirely in portrait-mode, whereas when the MPMoviePlayer loads it rotates the screen to landscape-mode.
Im guessing there is a property that should adress this, but after messing around with both movieControlMode and scalingMode it persists on appearing in landscape.
Any ideas how I can make it stick to portrait-mode?
Im guessing there is a property that should adress this, but after messing around with both movieControlMode and scalingMode it persists on appearing in landscape.
Code:
// Init: MPPlayer
mpPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:soundPath]];
// Ive tried all these: MPMovieControlModeDefault, MPMovieControlModeVolumeOnly, MPMovieControlModeHidden.
mpPlayer.movieControlMode = MPMovieControlModeDefault;
// Ive tried all these MPMovieScalingModeNone, MPMovieScalingModeAspectFit, MPMovieScalingModeAspectFill, MPMovieScalingModeFill.
mpPlayer.scalingMode = MPMovieScalingModeAspectFill;
// Release: Release object after play
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMovieFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
// Play: Sound
[mpPlayer play];
Any ideas how I can make it stick to portrait-mode?