im trying to build a program (using pysimplegui) which contains a few buttons (play, stop, pause, next, previous) as you can see. and when i press "next" its stopping for some time and then the same music continues (i dont press "previous" because i know that will cause problem 0 - 1 = -1). `
global n
n = 0
media_player = vlc.MediaPlayer()
url = ['http://cast.radiogroup.com.ua:8000/avtoradio', 'http://listen.rpfm.ru:9000/premium128', 'http://cast.loungefm.com.ua/terrace128']
media_player.set_mrl(url[n])
if event == 'play':
media_player.play()
if event == 'stop':
media_player.stop()
if event == 'pause':
media_player.pause()
if event == 'next':
global n
n + 1
media_player.set_mrl(url[n])
media_player.play()
if event == 'previous':
n - 1
media_player.set_mrl(url[n])
media_player.play()
`
- ive tried to google this problem
- i didnt find the documentation
- im trying to run it in a bit different way, using `
import vlc
playlist_url = ['http://cast.radiogroup.com.ua:8000/avtoradio', 'http://listen.rpfm.ru:9000/premium128', 'http://cast.loungefm.com.ua/terrace128']
n = int(input())
instance = vlc.Instance('--intf dummy')
player = instance.media_list_player_new()
media = instance.media_list_new(playlist_url[n])
player.set_media_list(media)
player.play()
` but it returns [0000027223bc32e0] filesystem stream error: cannot open file C:\Users\dadva\Desktop\Project\h (No such file or directory) [0000027223ba3220] main input error: Your input can't be opened [0000027223ba3220] main input error: VLC is unable to open the MRL 'file:///C:/Users/dadva/Desktop/Project/h'. Check the log for details.