2012-03-27, 21:14
Can someone please point me in the right direction for listening to player events, onPlayBackStarted etc, in a service addon?
"init" gets logged but never "play", Python isn't my preferred language so I'm sure if there's a better way to subscribe to player events but I found some example code where they were listening to player event this way using the old autoexec.py
Code:
import xbmc
class PlayerEvents(xbmc.Player) :
def onPlayBackStarted(self):
xbmc.log("play")
player=PlayerEvents()
xbmc.log("init")
"init" gets logged but never "play", Python isn't my preferred language so I'm sure if there's a better way to subscribe to player events but I found some example code where they were listening to player event this way using the old autoexec.py