質問

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!

役に立ちましたか?

解決

Problem solved: Using ASBQuickTimeApplication.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top