go run main.go
Enter the address of your local http://localhost:8080/stream
server into your browser's search bar and wait for it to start playing, or use any audio player that supports real-time audio streaming. For example:
sudo apt install mpv
mpv http://localhost:8080/stream
- Open VLC.
- Go to Media -> Open Network Stream (or press
Ctrl+N
). - In the "Network URL" field, enter
http://localhost:8080/stream
and click play.