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

  • Home
  • SEARCH
  • 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 6021903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:46:52+00:00 2026-05-23T03:46:52+00:00

I have an app that allows the user to move from a list of

  • 0

I have an app that allows the user to move from a list of media items to a specific item using the drill-down table view model.

Main View

Once the user is inside the detail view, another table view exists allowing the user to select a specific media item.

Detail View

I am having an issue creating a modal media player to play the .mp4 items. The code below is what I have so far.

if (indexPath.section == SectionHeader && indexPath.row == SectionHeaderEnclosure) {  
    if (item.enclosures) {  
        for (NSDictionary *dict in item.enclosures){ 

            NSString *url = [dict objectForKey:@"url"];  
            NSLog(@" url is : %@",url); 

            //EXPERIMENTAL
            MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];  

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

            if ([moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]) {  
                // Use the 3.2 style API  
                moviePlayer.controlStyle = MPMovieControlStyleDefault;  
                moviePlayer.shouldAutoplay = YES;  
                [self.view addSubview:moviePlayer.view];  
                [moviePlayer setFullscreen:YES animated:YES];  
            } else {  
                // Use the 2.0 style API  
                moviePlayer.movieControlMode = MPMovieControlModeHidden;  
                [moviePlayer play];  
            }           
        }  
    }  
}

I need help with this line:
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];

It is giving me an NSInvaild Argument Exception. I need help with the video player creation and subsequent deletion from the view.

  • 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-23T03:46:53+00:00Added an answer on May 23, 2026 at 3:46 am

    It looks like you have the URL stored as a plain NSString, whereas the player expects an NSURL. How about this?

    MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] 
        initWithContentURL:[NSURL URLWithString:url]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that allows the user to either select a video from
I have an app that allows the user to choose an image, at design
I have an app that allows you to create Home shortcuts to a specific
I have an existing web app that allows users to rate items based on
I have a Silverlight 4 app which pulls entities down from a database using
I have an app that allows a user to use JQuery and Javascript to
We have an app that allows users to send e-mails from our system. It
I have a small app that allows the user to draw on the screen
I have a .NET app that allows a user to choose their own language
I have a Django app that allows the user to create variables and name

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.