A Python script to connect to the WebSocket and do whatever you like would probably be less then 20 lines, and we could even host an example on the wiki. That's the advantage of using standard technology - there is a library for that
It's just the far more versatile option, and avoids all concerns of running applications in MCs context.
If I understand this correctly, I'd need to write a python client that makes a websocket connection to MediaCenter listening for messages from MediaCenter.
For my simple needs, that is extra coding and running the listener client, and monitoring to make sure the client is running 24/7 and stopping restarting it every time I stop/restart MediaCenter.
The data processing of the new track/state change info is currently written in C++ and I wouldn't want to rewrite all of it in Python, so I'm likely end up calling my C++ program from the Python client.... not ideal.
Running a user configured program from MC is the simplest option for me and would require minimal programming change for me.
Currenty "PlayingNow" writes out the current/next tracking info I need to a file and then tells me a track changed by calling my configured program. I'd need to just get the current/next track data using WSMC and then all of the rest of my code would work as written.
Running a configured program on track state/change would give many of us an unlimited easy method to get notified that "something" happened" and then we would handle that info using the knowledge we currently have.
The "PlayingNow" plugin I bought in 2007,. which is run by MediaCenter has been successfully calling my configured *program* on every track change since 2007.
** a bat file which calls the my exe program with the options it needs
While others may have other needs... I believe running a configured program on MC track/state change would be useful to many.
Please implement it, even if websockets are implemented too.
I'm really working hard to find a workable alternative to the "PlayingNow" plugin without major changes to my code.