Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4559470
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:47:36+00:00 2026-05-21T17:47:36+00:00

I am having problem with MPMovieplayerController . mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; now when

  • 0

I am having problem with MPMovieplayerController .

mp =  [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

now when I try to write mp. the list does not contain the “setControlStyle” ! is there any thing wrong ?

and if I write directly [mp setControlStyle:MPMovieControlStyleFullscreen]; than video starts in full screen but done button is not displayed but ya if I click on the place where done button should be than it works fine !!!!

EDITED :

  - (id)initWithPath:(NSString *)moviePath
   {
// Initialize and create movie URL
    if (self = [super init])
   {
        movieURL = [NSURL URLWithString:moviePath];    
    [movieURL retain];
   }
return self;
 }

- (void) readyPlayer
{
mp =  [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

[mp setControlStyle:MPMovieControlStyleFullscreen];
 [mp setFullscreen:YES];

if ([mp respondsToSelector:@selector(loadState)]) 
{
    // Register that the load state changed (movie is ready)
[[NSNotificationCenter defaultCenter] addObserver:self 
                   selector:@selector(moviePlayerLoadStateChanged:) 
                   name:MPMoviePlayerLoadStateDidChangeNotification 
                   object:nil];
  }

  else

  {
  [NSNotificationCenter defaultCenter] addObserver:self 
                     selector:@selector(moviePreloadDidFinish:) 
                     name:MPMoviePlayerContentPreloadDidFinishNotification 
                     object:nil];
  }

  // Register to receive a notification when the movie has finished playing. 
 [[NSNotificationCenter defaultCenter] addObserver:self 
                    selector:@selector(moviePlayBackDidFinish:) 
                    name:MPMoviePlayerPlaybackDidFinishNotification 
                    object:nil];
 }

  - (void) loadView
  {
  [self setView:[[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]  autorelease]];
[[self view] setBackgroundColor:[UIColor blackColor]];
  }

  - (void) moviePlayerLoadStateChanged:(NSNotification*)notification 
  {
//[self makeButton];
// Unless state is unknown, start playback
if ([mp loadState] != MPMovieLoadStateUnknown)
  {

    [[NSNotificationCenter  defaultCenter] removeObserver:self
                                       name:MPMoviePlayerLoadStateDidChangeNotification 
                                       object:nil];


   [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];

    // Rotate the view for landscape playback
 [[self view] setBounds:CGRectMake(0, 0, 480, 320)];
 [[self view] setCenter:CGPointMake(160, 240)];
 [[self view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)]; 

    // Set frame of movieplayer
    [[mp view] setFrame:CGRectMake(0, 0, 480, 320)];


// Add movie player as subview
  [[self view] addSubview:[mp view]];   

    // Play the movie
    [mp play];
}
 }

need guidance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:47:37+00:00Added an answer on May 21, 2026 at 5:47 pm

    As the property in question is called controlStyle, you could use mp.controlStyle=..; or [mp setControlStyle:..];

    For the second question / issue, see mpmovieplayercontroller-audio-show-done-button for a quick workaround solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
Having a slight problem with MPMoviePlayerController. I am playing a movie and if the
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:video_url]; [[player view] setFrame : [ib_image_base_view bounds]]; [ib_image_base_view addSubview
i having problem understanding what is wrong with my inheritance. I just can not
I am having problem understanding Priority Inversion Snippet from the article: Consider there is
Having problem in IE8 with vertical align for images not working when a table
I am having problem defining CSS rules for browsers that do not support font-stretch
I'm having problem when running my Windows Forms program. In the program, I have
I'm having problem with Rails plugin attachment_fu . On every upload, I get validation
i'm having problem to deal with charset in ruby on rails app, specificially in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.