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 7640909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:47:27+00:00 2026-05-31T08:47:27+00:00

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:video_url]; [[player view] setFrame : [ib_image_base_view bounds]]; [ib_image_base_view addSubview

  • 0
MPMoviePlayerController *player 
    = [[MPMoviePlayerController alloc] initWithContentURL:video_url];

[[player view] setFrame : [ib_image_base_view bounds]];

[ib_image_base_view addSubview : [player view]];

[player play];

Above are the 5 statements I am using to play a video file. The video_url has value :
“Intro_00.mp4 — file://localhost/” as echoed by a NSLog statement. Its value is initialized as : video_url = [NSURL fileURLWithPath: @”Intro_00.mp4″];

The problem is the MoviePlayer is not having any response, there is no error or warning message from Xcode either. The 5 lines of code are part of an iPhone project.

Hope somebody can give some hints.

(*** for some reasons stackoverflow’s “add comment” does not work at the moment)

Comments are added below …

Have tried the following as suggested, but still no response.

[player setControlStyle: MPMovieControlStyleEmbedded];

Update 1 :

Have found out that the video_url is “null” all along. So I find and download a related sample project from Apple. But the same problem seems to persist. For details please refer to here.

Update 2 :

@Eduardo has found the solution to both questions. So this question should be closed. Thanks for the kind assistance and response from all who have look into my post 🙂

  • 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-31T08:47:28+00:00Added an answer on May 31, 2026 at 8:47 am

    Use [[NSBundle mainBundle] pathForResource:"Intro_00.mp4"] and remember to add the file to the bundle (Project Build Steps > Copy Resources)

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

Sidebar

Related Questions

I created a global variable: MPMoviePlayerController *player; I play the video with the following
I am using MPMoviePlayerController currently to play a video inside IPhone and now I
I am using MPMoviePlayerController class for playing the video in built-in media player on
Is it possible to play movie again and again using the MPMoviePlayerController class? Thanks
I want to rotate my movie player view explicitly (not using Autorotation delegate) .
In my app, I play a video using this simple code: NSBundle *bundle =
I am using the following code to play the video. Actually it is playing
I'm using a MPMoviePlayerController in my iPhone app to display some short video clips
You might have seen video through you tube in iPhone. Normal MPMoviePlayerController has previous,
I have a MPMoviePlayerController object that plays a video fullscreen in either portrait or

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.