Now we play and stop

pull/1/head
José Carlos Cuevas 6 months ago
parent b21738d4ed
commit c43c008715

@ -0,0 +1 @@
golang 1.21.4

@ -133,10 +133,16 @@ func main() {
radiospiral_label,
nowplaying_label,
widget.NewButton("Play", func() {
nowplaying_label.SetText("Playing!")
mplayer.Play("http://radiospiral.radio/stream.mp3")
if !mplayer.is_playing {
nowplaying_label.SetText("Playing!")
mplayer.Play("http://radiospiral.radio/stream.mp3")
} else {
nowplaying_label.SetText("Stopped")
mplayer.Pause()
}
}),
))
window.ShowAndRun()
mplayer.Close()
}

Loading…
Cancel
Save