Did you know Bot Libre also provides free hosted issue tracking for your own website or mobile app?
Self, AIML, and scripting

making a web-radio player?

by ronxtcdabass posted Jun 13 2022, 16:30


can someone help me with this?

i tried to modify the "musicplayer" script for playing my favoriteradio station, but what must i do now?

where must i put this to let my bot play?

(english is not so easy for me. my mothertongue is german.)


greeting: Hello there. wanna hear some of my favorite  stations?  default: Sorry, but I do not understand. try something other. play #play_music play music "

What radio station would you like?:




" label: #play_music keywords: music audio play start GlobalBeats FM - Green Channel playing GlobalBeats FM command: { type: "music", cmd: "play", genre: "GlobalBeats FM", url: "http://gbs03.de:7120" } poses: dancing Suburbs of Goa: [SomaFM] playing Suburbs of Goa command: { type: "music", cmd: "play", genre: "Suburbs of Goa", url: "http://ice1.somafm.com/suburbsofgoa-128-mp3" } poses: dancing Babaganousha Radio playing Babaganousha Radio command: { type: "music", cmd: "play", genre: "Babaganousha Radio", url: "http://babaganousha.net:8000" } poses: dancing Hirschmilch psytrance playing Hirschmilch psytrance command: { type: "music", cmd: "play", genre: "Hirschmilch psytrance", url: "http://hirschmilch.de:7000/psytrance.mp3" } poses: dancing Hirschmilch progressive playing Hirschmilch progressive command: { type: "music", cmd: "play", genre: "Hirschmilch progressive", url: "http://hirschmilch.de:7000/progressive.mp3" } poses: dancing pause paused... keywords: pause stop command: { type: "music", cmd: "pause", url: "https://rfcmedia.streamguys1.com/MusicPulse.mp3" } poses: default

by admin posted Jun 13 2022, 17:24
Please include a link to the musicplayer script you are trying to modify.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 660, today: 2, week: 2, month: 47

by ronxtcdabass posted Jun 20 2022, 12:11

The idea comes from:

https://www.botlibre.com/script?id=36415757   and


in the example it works only with this website.

In the code from the first link are only entries to ***.mp3 so i tried with other files and it worked, but not with radiostreams...

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 671, today: 2, week: 2, month: 46

by admin posted Jun 21 2022, 8:53

So the bot in this script uses "commands" in Bot Libre to pass back the audio commands to the client.

Your web or mobile client needs to process these commands to play the audio.

In the example website it uses some JavaScript code to process the audio command, you need this code for you bot to play audio.

var audio = new Audio();
function PlayMusic() {
this.updateAvatar = function(response) {
if (response.command != null) {
var command = JSON.parse(response.command);
if (command.cmd == "play") {
audio.src = command.url;
} else if (command.cmd == "pause") {

web.game = new PlayMusic();

Thumbs up: 1, thumbs down: 0, stars: 5.0
Views: 677, today: 2, week: 2, month: 50

by ronxtcdabass posted Jun 21 2022, 12:55



thank you for the fast help!

it works...

edited: it works in my html file at my PC but online at my webspace works only [Soma FM] ...

my testpage: Test

Updated: Jun 21 2022, 14:47
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 661, today: 3, week: 3, month: 53

Id: 43374659
Tags: how to, music, radio
Posted: Jun 13 2022, 16:30
Replies: 3
Views: 733, today: 3, week: 3, month: 42
0 0 0.0/5