0

I'm new to python vlc so I'm not sure if I'm asking the right question. That being said what I want to do is for example if I run the code below twice the initial instance will stop (i.e the song will stop playing automatically).

def mediaPlayer():
    instance = vlc.Instance('--play-and-exit')
    url=[song1.mp3,song2.mp3]
    media_list = instance.media_list_new(url)
    list_player = instance.media_list_player_new()            
    list_player.set_media_list(media_list)
    list_player.play()

0 Answers0