• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
QTMovie not playing in new window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTMovie not playing in new window


  • Subject: QTMovie not playing in new window
  • From: Paolo Franzetti <email@hidden>
  • Date: Mon, 04 Jul 2011 11:21:02 +0200

I have a MAC OSX application in which I would like to press a button in the main window and open a new window in which a movie is played. This is my IBAction code;

Code:

- (IBAction) playButtonClicked: (id) sender
{
  MoviePlayerController *moviePlayerWindow = [[MoviePlayerController alloc] initWithWindowNibName:@"MoviePlayer"];
  [moviePlayerWindow showWindow:self];

  NSError *error;
  NSString *moviePath = [[NSBundle mainBundle] pathForResource:@"sample_iTunes" ofType:@"mov"];
  QTMovie *movie = [QTMovie movieWithFile:moviePath error:&error];
  if (error) {
      NSLog(@"%@", [error localizedDescription]);
  } else {
      [movie gotoBeginning];
      [moviePlayerWindow.movieViewer setMovie:movie];
      [moviePlayerWindow.movieViewer play:nil];
  }

}

movieViewer is a QTMovieViewer outlet inside the new window.

The window opens but no movie is played; can someone understand what I am doing wrong ? I can send the complete project (it is a test one, very small) if needed.

Thank you very much for any help.

Paolo
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: QTMovie not playing in new window
      • From: Michael Babin <email@hidden>
    • Re: QTMovie not playing in new window
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: iOS: AVFoundation, AVAssetWriter and caching
  • Next by Date: NSComboBox in NSTableView behaving strangely
  • Previous by thread: Re: iOS: AVFoundation, AVAssetWriter and caching
  • Next by thread: Re: QTMovie not playing in new window
  • Index(es):
    • Date
    • Thread