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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:57:19+00:00 2026-06-12T17:57:19+00:00

I am making an app that can display a preloaded file on the ios

  • 0

I am making an app that can display a preloaded file on the ios simulator. Though the display screen shows on the simulator, I can’t see the video nor hear the sound.

Here is my code.

#import "BIDViewController.h"

@implementation BIDViewController
@synthesize moviePlayer;


-(IBAction)playMovie:(id)sender
{
NSString *url = [[NSBundle mainBundle]
                pathForResource:@"SwimGood" ofType:@"m4v"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc]
                                initWithContentURL:[NSURL fileURLWithPath:url]];
//Play partial screen.

player.view.frame = CGRectMake(64, 100, 200, 150);

[self.view addSubview: player.view];
[self.moviePlayer prepareToPlay];

[player play];
}
  • 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-06-12T17:57:20+00:00Added an answer on June 12, 2026 at 5:57 pm

    I am Using like this

    NSString *videoFilepath = [[NSBundle mainBundle]
    pathForResource:[tempDic objectForKey:@”VideoName”] ofType:@”mov”];

    NSURL *url = [NSURL fileURLWithPath:videoFilepath];
    

    MPMoviePlayerController *playerViewController =[[MPMoviePlayerController alloc] init];
    playerViewController.view.frame = CGRectMake(6, 5, 308, 202);

    [playerViewController setContentURL:url];
    playerViewController.controlStyle = MPMovieControlStyleNone;
    [playerViewController prepareToPlay];
      [self.view addSubview:[playerViewController view]];
    

    and It’s working fine..so it might be a problem of file type. so try to use .mov

    and Don’t forgot to import MediaPlayer/MediaPlayer.h
    And Add MediaPlayer framework it not exists in your main bundle.

    Best Luck…

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

Sidebar

Related Questions

I am making an AIR for iOS app that can download pdfs. I do
I'm making an iPhone app that has information about different video games. How can
Im making an app that should let the user see video from the camera
I'm making an app that uses the full screen to display an image like
I am making an app that will play sound on events but I can't
I am making a small section of an app (phone and website) that can
i'm making app that the main page include TableView but i want when i
I am making app that takes a screenshot of a URL requested by the
I am making an app that records a destination (a city, state, country, town,
I'm making an app that is requesting data from a Web Service (implementing Soap).

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.