Music Player Using Python And Tkinter
#Belgin Android
# Follow Me At Instagram -- @tech_belgin , @belgin_official
# You Can Also Edit The Following Code To Get Input From The user To Choose Song
from tkinter import *
from pygame import mixer
mixer.init()
mixer.music.load("Bad Boy.mp3")
mixer.music.set_volume(0.5)
window=Tk()
window.title("Music Player")
window.geometry("1366x720")
def play(): #For Playing The Audio
mixer.music.play()
btn=Button(window,text="Start To Play Or Repeat From First",command=play)
btn.grid(column=100,row=0)
def Pause(): #For Pausing The Audio
mixer.music.pause()
btn=Button(window,text=" Pause The Song ",command=Pause)
btn.grid(column=100,row=101)
def UnPause(): #For Unpausing The Audio
mixer.music.unpause()
btn=Button(window,text=" UnPause The Song ",command=UnPause)
btn.grid(column=100,row=102)
def stop(): #To Stop The Song
mixer.music.stop()
btn=Button(window,text=" Stop The Song ",command=stop)
btn.grid(column=100,row=103)
window.mainloop()
Comments
Post a Comment