2014-06-24, 23:01
pilluli,
I wrote a script module which extends the xbmc.Monitor class that you might want to look into. It provides onStereoModeChanged(), onProfileChanged() and onPlaybackStarted() events in the monitor class in addition to it's standard events. There are some extra things you need to do when you subclassing it instead of the xbmc.Monitor. Below are links to the module and an example script that subclasses from the module. Each of the events are monitored in separate threads and the polling intervals can be set individually. The onPlayBackStarted event was added because in the current release, that event isn't fired in player for external players.
Module: https://github.com/KenV99/script.module.monitorext
Example Script: https://github.com/KenV99/script.monitorextexample
If you get a chance, let me know what you think or if you have any questions or if there are any other events you might want to see added. I'd be happy to fork your current and write it in if you wish...
Ken
I wrote a script module which extends the xbmc.Monitor class that you might want to look into. It provides onStereoModeChanged(), onProfileChanged() and onPlaybackStarted() events in the monitor class in addition to it's standard events. There are some extra things you need to do when you subclassing it instead of the xbmc.Monitor. Below are links to the module and an example script that subclasses from the module. Each of the events are monitored in separate threads and the polling intervals can be set individually. The onPlayBackStarted event was added because in the current release, that event isn't fired in player for external players.
Module: https://github.com/KenV99/script.module.monitorext
Example Script: https://github.com/KenV99/script.monitorextexample
If you get a chance, let me know what you think or if you have any questions or if there are any other events you might want to see added. I'd be happy to fork your current and write it in if you wish...
Ken