libvlc - How to change volume during playback
I am trying to set volume while playing an audio file but it doesn't seem
to work at all. Please what am I doing wrong?
# create a vlc playable object from source
self.playable = vlc.libvlc_media_new_path(self.instance, sourceURL)
# create a new vlc player
self.player = vlc.libvlc_media_player_new_from_media(self.playable)
# play
vlc.libvlc_media_player_play(self.player)
while True:
sleep(10)
self.player.audio_set_volume(50)
No comments:
Post a Comment