Lo sapevate Bot Libre offre anche la connessione ospitato il forum per il tuo sito web o un'applicazione mobile?
Self, AIML, and scripting : making a web-radio player?

RE: making a web-radio player?

da admin postato Jun 21, 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();

by ronxtcdabass posted Jun 21, 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, 14:47
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 99, today: 0, week: 2, month: 2

Id: 43456779
Postato: Jun 21, 8:53
Risposte: 1
Vista: 117, oggi: 1, settimana: 4, mese: 3
1 0 5.0/5