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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:04:38+00:00 2026-05-31T13:04:38+00:00

Here is my code -(IBAction)playvideo:(id)sender { NSLog(@Get in); NSString *moviePath = [[NSBundle mainBundle] pathForResource:@video3

  • 0

Here is my code

-(IBAction)playvideo:(id)sender
{
NSLog(@"Get in");
    NSString *moviePath = [[NSBundle mainBundle] pathForResource:@"video3" ofType:@"MOV"];
MPMoviePlayerController *movie = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]];
    NSLog(@"movie path %@",moviePath);
    NSLog(@"movie %@",movie);
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieViewFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:movie];
    movie.controlStyle = MPMovieControlStyleDefault;
    movie.shouldAutoplay = YES;
    [self.view addSubview:movie.view];
    [movie setFullscreen:YES animated:YES];
    [movie play];
}

and Here is my log

2012-03-16 16:54:39.080 TestVideofile[510:11f03] Get in 2012-03-16
16:54:39.303 TestVideofile[510:11f03] movie path
/Users/crazyoxy/Library/Application Support/iPhone
Simulator/5.1/Applications/7F1425B8-6DB0-4A09-AC8F-3BCDBF19ED95/TestVideofile.app/video3.MOV
2012-03-16 16:54:39.304 TestVideofile[510:11f03] movie <
MPMoviePlayerController: 0x7a8ea30 >

After I click button that link with this IBAction, it turns to black page but didn’t show video or even any audio.

Could you help me please?

  • 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-31T13:04:39+00:00Added an answer on May 31, 2026 at 1:04 pm

    You are using ARC and the player gets released if no further references exist.

    Adding it as a property to your ViewController instance keeps the instance alive as long as the ViewController is.

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

Sidebar

Related Questions

enter code here-(IBAction)Call:(id)sender{ //[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@tel://18005551234]]; /*NSString *phoneStr = [[NSString alloc] initWithFormat:@tel:%@,phoneNumber.text]; NSURL
Here is the code: -(IBAction)customButtonPressed:(id)sender { NSString *text = Field.text; //label is called Label
Here is the code: - (IBAction) charlieImputText:(id)sender { NSAppleScript *keystrokeReturn = [[NSAppleScript alloc] initWithSource:@tell
Here's the code: - (IBAction) charlieInputText:(id)sender { //getting value from text field when entered
Here is the code: - (IBAction) startRecognition:(id)sender { backgroundSoundLevel = [backgroundSoundChange stringValue]; timer =
Here's my code: - (IBAction)showTaskDetailView:(id)sender { [window setContentView:viewTaskView]; } How would I fade out
Here is my code: -(IBAction)encryptText:(id)sender { key = self.tvKey.text; CCCryptorStatus status = kCCSuccess; algorithm
Here is the code: - (IBAction)textFieldDidBeginEditing:(UITextField *)textField { NSLog(@Inside textfieldDidBeginEditing); textFieldBeingEdited = textField; }
I have a method here that is in my code: -(IBAction) actionButtonPressed: (id) sender{
I have this code: - (IBAction)next { // <-- here index++; // Set imageCount

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.