I'm writing a player program in python.
The effect I want to achieve is to get a signal after playing a song and then go to the next song.
some code:
def end_call_back(event):
print('call:', 'a song finished')
if "__main__" == __name__:
app = App()
app.player.play('sample1.mp4')
app.player.add_callback(vlc.EventType.MediaPlayerStopped, end_call_back)
**# Here , I want to received a signal to play the next song.**
app.mainloop()
now, I can get the sentence in the console,“a song finished”
What should I do next in the main process to get a signal to play the next song?