May-14-2020, 07:02 AM
Hi,
I want to implement music player in tkinter gui. For some reasons I am not able to use python musicplayer library which needs vc++ environment. So I am using pygame mixer module. Stuck on implementation of music players's seek feature.
The following code implemented in pygame mixer and tkinter can play only ogg formats. How to update so as to play mp3 and wav formats also.
https://stackoverflow.com/questions/5408...elation-to.
When I try to play MP3 the slider works fine for some times but after the music gets stopped playing. The below method is where the problem occurs.
I want to implement music player in tkinter gui. For some reasons I am not able to use python musicplayer library which needs vc++ environment. So I am using pygame mixer module. Stuck on implementation of music players's seek feature.
The following code implemented in pygame mixer and tkinter can play only ogg formats. How to update so as to play mp3 and wav formats also.
https://stackoverflow.com/questions/5408...elation-to.
When I try to play MP3 the slider works fine for some times but after the music gets stopped playing. The below method is where the problem occurs.
def UpdateSlider( self, value ): '''Move slider position when tk.Scale's trough is clicked or when slider is clicked.''' print( '\ndef UpdateSlider():' ); print(type(value),'value = ',value,' sec') if self.player.music.get_busy(): print("Track Playing") self.after_cancel( self.loopID ) #Cancel PlayTrack loop self.slider_value.set( value ) #Move slider to new position self.Play( ) #Play track from new postion else: print("Track Not Playing") self.slider_value.set( value ) #Move slider to new position