📜  互联网广播流的 python 代码 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:24.454000             🧑  作者: Mango

代码示例2
import vlc
import time

url = 'http://prem1.rockradio.com:80/bluesrock?9555ae7caa92404c73cade1d'

#define VLC instance
instance = vlc.Instance('--input-repeat=-1', '--fullscreen')

#Define VLC player
player=instance.media_player_new()

#Define VLC media
media=instance.media_new(url)

#Set player media
player.set_media(media)

#Play the media
player.play()