Frage

I would like to open QuickTime and play a remote file.

I use the following code:

NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/open"];
[task setArguments:[NSArray arrayWithObjects: @"/Applications/QuickTime Player.app", @"http://...", nil]];
[task launch];

But the console says:

Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all

What's wrong? I also mod the third line:

[task setArguments:[NSArray arrayWithObjects: @"-a", @"/Applications/QuickTime Player.app", @"http://...", nil]];

I only found an answer for non native code: How can I start QuickTime and have it start playing a url?

Thanks very much for some hints or samples!

War es hilfreich?

Lösung

Problem solved: Using ASBQuickTimeApplication.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top