Get isPlayingAudio
#1
Hello!
i´m slowly starting to understand some of the aspects of python programming.
There is just one thing that is bothering me...
if I would like to know if xbmc is playing audio I could write:
if xbmc.Player().isPlayingAudio():
*"then do something"
but then it has to be in the main loop, could I instead define it as a function
of the class "xbmc.Player" and then get xbmc (xbmc.player) to update the function instead of me asking it in the mainloop.
I would like to have the same function of "isPlayingAudio" as “onPlaybackStarted” because onPlaybackStarted reports back when it is changed
look below..
class MyPlayer(xbmc.Player):

def __init__(self):
xbmc.Player.__init__(self)

def onPlayBackStarted(self):
print ("XBMC PbStarted")

player=MyPlayer()

is it possible? I cant get this to work with “isPlayingAudio”, my guess is that “onPlayback Started” is written to report back with a “return” but isPlayingAudio” is not, is that correct?
Thankfull for any replies/
Cheers
Reply

Logout Mark Read Team Forum Stats Members Help
Get isPlayingAudio0