Help with QT Import ...
Help with QT Import ...
- Subject: Help with QT Import ...
- From: Paul Figgiani <email@hidden>
- Date: Mon, 13 Nov 2006 22:40:37 -0500
Thanks for the assistance ... I need a hand:
The following code works with one exception:
NS-Open Panel incorporates a QT movie into a simple UI. My problem is
that once the file is incorporated, the audio is present without the
associated video when playback begins. However, If I click outside
of the UI while the file is playing, the video appears.
Thanks Again for the help. [ptfigg]
* * * * *
#import "MyController.h"
@implementation MyController
QTMovie* qtMovie;
- (IBAction)handleOpenMovie:(id)sender
{
NSArray* fileTypes = [NSArray arrayWithObjects:@"mov", @"mp4",
@"m4a", @"mp3", @"m4p", @"jpg", nil];
NSString* moviesDir = [NSHomeDirectory() stringByAppendingString:
[NSString stringWithString: @"/Movies"]];
printf ("\n\nhandleOpenMenuItem!\n");
NSOpenPanel* panel = [NSOpenPanel openPanel];
[panel runModalForDirectory:moviesDir file:nil types:fileTypes ];
printf ("panel dismissed\n");
NSURL* url = [[panel URLs] objectAtIndex: 0];
printf ("URL: %s\n", [[url absoluteString] cString]);
printf ("Creating qtmovie\n");
NSError* openError = nil;
qtMovie = [QTMovie movieWithURL: url error:&openError];
if (openError != nil) {
printf ("Error!\n");
}
[movieView setControllerVisible: YES];
[movieView setMovie: qtMovie];
printf ("movieView set\n");
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden