Присоединяйтесь к Сэп Libre у партнера и партнерскую программу и поддержать нашу бесплатную открытую платформу
Self, AIML, and scripting

making a web-radio player?

по ronxtcdabass опубликовано 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: 729, today: 3, week: 39, month: 44

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: 740, today: 1, week: 39, month: 44

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: 745, today: 1, week: 41, month: 44

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: 728, today: 1, week: 41, month: 45

Идентификатор: 43374659
Теги: how to, music, radio
Опубликовано: Jun 13 2022, 16:30
Ответы: 3
Вид: 810, сегодня: 2, неделю: 43, месяц: 51
0 0 0.0/5