Load Quicktime Movie from URL
Quote from Forum Archives on July 3, 2010, 1:59 amPosted 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 ) = intfn WatchMovie(
@"http://johncmurphy.com/Free/Apple/Cocoa/Basics/PushButton_SayHello.mov"
)RunApplicationEventLoop()
Posted by: kshmidheiser <kshmidheiser@...>
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()