So I’m making a music player with the PyMedia module and the Tkinter module. I’ve been Googling for an answer on to to “check” if PyMedia.startPlayback is busy playing a song, but so far I’ve been unsuccessful. My goal is to be able to play the next song in the queue when the current song stops playing.
for example:
def Listen(songs):
global player
while True:
songs+=1
def play(number):
player.startPlayback(number)
def pause():
player.pausePlayback()
#init pymedia player
player= pymedia.Player()
player.start()
play(songs)
#wait till song is done playing...
#After finished continue on to the next one
play(songs)
This isn’t the exact code but it is the gist of it.
I have python 2.7 on Windows 7. Thanks for you input.
http://pymedia.org/docs/pymedia.player.html
The docs list an
isPlayingfunction for the player. They even use it in the example for the while loop.