Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local fm = component.openfm_radio
- local event = require("event")
- local keyboard = require("keyboard")
- fm.setURL("http://localhost:8080/touhou.ogg") -- Before this, you must start your own substream in VLC, because using http://www.touhou.fm:8001/touhou.ogg will result in the stream being closed after the intro
- fm.start()
- while true do
- local ev, address, char, code, userName = event.pull("key_down")
- if code == keyboard.keys.back then
- fm.stop()
- break
- elseif code == keyboard.keys.up then
- fm.volUp()
- elseif code == keyboard.keys.down then
- fm.volDown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement