Forum Navigation
You need to log in to create posts and topics.

Load Quicktime Movie from URL

Posted by: kshmidheiser <kshmidheiser@...>

Here's a little snippet to enjoy.

Ken

BeginCCode
void WatchMovie( CFStringRef movieRef ) {

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSURL *movieURL = [NSURL URLWithString:(NSString *)movieRef];
[[NSWorkspace sharedWorkspace]
openURLs:[NSArray arrayWithObjects:movieURL, nil]
withAppBundleIdentifier:@"com.apple.quicktimeplayer"
options:nil
additionalEventParamDescriptor:nil
launchIdentifiers:nil];
[pool drain];
}
EndC
toolbox fn WatchMovie( CFStringRef ) = int

fn WatchMovie(
@"http://johncmurphy.com/Free/Apple/Cocoa/Basics/PushButton_SayHello.mov"
)

RunApplicationEventLoop()