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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:43:41+00:00 2026-06-13T09:43:41+00:00

Playing a video to start the application I have this code, I can’t see

  • 0

Playing a video to start the application

I have this code, I can’t see the video and I can hear the audio.

Could anyone explain why ?

-(void)awakeFromNib
{

    NSURL *url2 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"tecnolitevideo_1" ofType:@"mov"]];

    moviePlayer =  [[MPMoviePlayerViewController alloc]
                    initWithContentURL:url2];
    [moviePlayer presentMoviePlayerViewControllerAnimated:moviePlayer];
    [moviePlayer.moviePlayer play];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateChanged:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];

}


-(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
    }
  • 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-13T09:43:42+00:00Added an answer on June 13, 2026 at 9:43 am
        - (void)viewDidLoad
        {
    
        NSURL* url = [[NSBundle mainBundle] URLForResource:@"3" withExtension:@"mov"];
    
                m_player = [[MPMoviePlayerController alloc] initWithContentURL:url];
                [m_player.backgroundView setBackgroundColor:[UIColor blackColor]];
                [m_player.view setBackgroundColor:[UIColor blackColor]];
                [m_player setControlStyle:MPMovieControlStyleNone];
                [[m_player view] setFrame:[self.view bounds]];
    
    
    
                [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
    
                [m_player play];
    
                [self.view addSubview:[m_player view]];
    
    
    }
    
    - (void) moviePlayBackDidFinish:(NSNotification*)_notification
    {
    
    
    
    
        [[NSNotificationCenter defaultCenter] removeObserver:self
                                                        name:MPMoviePlayerPlaybackDidFinishNotification
                                                      object:nil];
    
    
    
          [m_player.view removeFromSuperview];
          [m_player stop];
    
        m_player = nil;
    }
    

    I am try this and works fine!!!

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

Sidebar

Related Questions

I have written this piece of objective-c code for playing a video after touching
I'm experimenting playing video in a UIWebView. If I have some html like this:
I have implement the following code in order to test playing a video from
I have made an application which includes movie player in it. Video starts playing
I developed an application. My application includes video recording and playing. I have to
how to I stop a Video from playing and go back to start? videoPlayer.currentPlaybackTime
I have a problem with playing video in mediaplayer. I have a sound but
Did anyone tried to customize the window in which the quicktime is playing video?
hi folks we do have a video file in our application,every thing is going
I want to mute a playing Video by VideoView in my Android Application. I

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.