Sorry for the long wait on this. So far we've only been using the events in our own plugins, and only for playlist change notifications. I've pasted below some preliminary documentation referring to handling events from VB.NET. Let me know if you need help sinking events in JavaScript or C++. With anything else, you're on your own :-)
The one event you're probably interested in (track change) was just added, so you won't see those until the next build (12.0.121?). You can get started now though and just rename a playlist to get an event to come through.
Bear with me in the following documentation. I never use VB but I did build a test program and it did catch events. Here you go...
MediaCenter 12 fires an event with three string parameters:
FireMJEvent(string1, string2, string3)
The first parameter is the event type and currently there is just one event type, namely "MJEvent type: MCCommand"
The second parameter identifies the MCC command. See the list below.
The third parameter is optional and may contain information specific to the command.
Here are the commands currently sent to the event handler:
"MCC: NOTIFY_TRACK_CHANGE"
"MCC: NOTIFY_PLAYLIST_ADDED"
"MCC: NOTIFY_PLAYLIST_INFO_CHANGED"
"MCC: NOTIFY_PLAYLIST_FILES_CHANGED"
"MCC: NOTIFY_PLAYLIST_REMOVED"
"MCC: NOTIFY_PLAYLIST_COLLECTION_CHANGED"
"MCC: NOTIFY_PLAYLIST_PROPERTIES_CHANGED"
The track change event is fired whenever a new track starts to play. Please let us know additional event notifications you would like and we can add them to the list. This is just a starting point.
To add a handler in VB.NET for events coming from Media Center:
1. Add a reference to Media Center's type library ("Media Center 12.tlb"). In VB.NET use the Projects/Add Reference option, select the "COM" tab, then select "MediaCenter" from the list.
2. Add the "Imports MediaCenter" statement to your code.
3. Declare your MC automation variable to handle events, like this:
Dim WithEvents MC As MCAutomation
4. Set the MC variable using either GetObject or CreateObject as outlined in the SDK documentation.
5. Declare a handler function for the event like this:
Private Sub MJEvent(ByVal s1 As String, ByVal s2 As String, ByVal s3 As String) Handles MC.FireMJEvent
MsgBox(s1 + " " + s2)
End Sub
6. That's it. Any event fired from MediaCenter should come to your function.