Re: Prevent DVD Player launch
Re: Prevent DVD Player launch
- Subject: Re: Prevent DVD Player launch
- From: Steve Christensen <email@hidden>
- Date: Thu, 2 Nov 2006 18:11:40 -0800
On Nov 2, 2006, at 7:35 AM, Craig Hopson wrote:
On Nov 1, 2006, at 4:55 PM, Ricky Sharp wrote:
On Nov 1, 2006, at 5:41 PM, Craig Hopson wrote:
This is not specifically a cocoa question, but it did come up
when playing with the CocoaDVDPlayer example, and I happen to
subscribe to this list...
Does anyone know how to prevent Apple's DVD Player from launching
when a DVD is inserted? We are working on something that is
based on the CocoaDVDPlayer sample code. However, when a DVD is
inserted, Apple's DVD Player auto launches. If it cannot grab
the DVD services it posts an error and quits. So, I know that by
using Default Apps I can change that behavior. But, is there a
programmatic way, maybe by accessing the launch services
database, to temporarily remove DVD Player (if it's configured
that way) and then restore the setting?
What app is launched is controlled by the "CDs & DVDs" system
preferences.
Yes, I understand that.
I suppose you could change those prefs when your app is run, but
that seems a bit unpleasant to me. Perhaps you could have your
users configure that setting appropriately?
I guess my question was not quite clear - I need to do this
programmatically and not involve the users.
I think that was clear from your original posting.
It seems to me that Ricky was just suggesting that it's not
considered good manners for a third party application to change the
user's (or even the default) settings without first asking the user
if it's OK. The user may have a perfectly valid reason for not
wanting their setting changed. If they choose not to have your
application be the recipient of inserted DVDs, then your application
doesn't have to perform its function for them.
Also, if for whatever reason your application doesn't cleanly exit,
the setting could be left pointing to your application even when it's
not running.
I do have one solution... com.apple.digihub.plist holds this
setting; I could temporarily change the value in that file. Does
anyone know of a better way to do this?
There may be some other way to do it, but if so I don't know what it
is. Given that the setting is available in a plist, the OS may go
peeking in there. Have you tried changing that setting to see what
happens?
steve
_______________________________________________
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