NSDistributedNotificationCenter...

Discuss Play, an open source multi-format audio player.
Post Reply
stringfellow
Posts: 8
Joined: Fri May 23, 2008 3:33 pm

NSDistributedNotificationCenter...

Post by stringfellow » Fri May 23, 2008 3:59 pm

Hi sbooth,
Just wondering what your notifications are? Trying to hook into them...
iTunes sends 'com.apple.iTunes.playerInfo' but Play seems to send nothing of the sort (according to NotificationWatcher) - it only sends 'GrowlNotification' and that is only when the track changes, not on a play or pause... or am I missing something?

Also... I can't see how to get the player position in the Apple Script Dictionary for Play - what is the equivalent of iTunes player_position?

Regards,
Steve

stringfellow
Posts: 8
Joined: Fri May 23, 2008 3:33 pm

Re: NSDistributedNotificationCenter...

Post by stringfellow » Fri May 23, 2008 5:01 pm

I found what I guess the notification *should* be:

org.sbooth.Play.playerInfo

but this doesnt seem to get broadcast...
BTW: Console says:

Bad _contents: nan

when it starts playing.

stringfellow
Posts: 8
Joined: Fri May 23, 2008 3:33 pm

Re: NSDistributedNotificationCenter...

Post by stringfellow » Fri May 23, 2008 5:26 pm

Disregard all that... I realise its only available in 1077 and I was using 1071!
Sorry :D

BUT

Still not sure how to get player position?!

-S

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: NSDistributedNotificationCenter...

Post by sbooth » Sat May 24, 2008 10:54 pm

Do you want to get the position via AppleScript or via a Cocoa API?

stringfellow
Posts: 8
Joined: Fri May 23, 2008 3:33 pm

Re: NSDistributedNotificationCenter...

Post by stringfellow » Sat May 24, 2008 11:07 pm

Either would be awesome... I'm using appscript as I'm writing a Python-Cocoa app, but if there is a nice way to do it via Cocoa that would be grand.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests