title: Playing a video in OSX
body: <p>I'm developing a mac app that requires to play tutorial videos in the app itself.
  when a user presses a button on the app it should play the video
  here's the code for xcode 4.3 (incompatible with xcode 5.1)</p>
  
  <pre><code>@synthesize movieView;
  -(IBAction)playVideo:(id)sender {
  NSString *videoPath = [[NSBundle mainBundle] pathForResource:"video name" ofType:@"mp4";
  NSURL *videoURL = [NSURL fileURLWithPath: videoPath];
  NSError *error = nil;
  
  NSDictionary *attrib = [NSDictionary dictionaryWithObjectsAndKeys:
                         [NSNumber  numberWithBool:YES],
                          QTMovieOpenForPlaybackAttribute,
                          videoURL, QTMovieURLAttribute,
                          [NSNumber numberWithBool:YES],
                          QTMovieOpenAsyncRequiredAttribute, nil];
  QTMovie *newMovie = [[QTMovie alloc] initWithAttributes: attrib error: &amp;error];
  [movieView setMovie:newMovie];
  [movieView play:newMovie];
  
  }
  </code></pre>
  
  <p>I'm using xcode 5.1 for osx 10.8</p>